From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8A94C433EF for ; Sat, 26 Feb 2022 20:53:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229670AbiBZUyS (ORCPT ); Sat, 26 Feb 2022 15:54:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229642AbiBZUyQ (ORCPT ); Sat, 26 Feb 2022 15:54:16 -0500 Received: from mxout02.lancloud.ru (mxout02.lancloud.ru [45.84.86.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8298922BFD for ; Sat, 26 Feb 2022 12:53:39 -0800 (PST) Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout02.lancloud.ru E92D420A5895 Received: from LanCloud Received: from LanCloud Received: from LanCloud To: Stefani Seibold , From: Sergey Shtylyov Subject: [PATCH] kfifo: make '__n' local variables *unsigned int* Organization: Open Mobile Platform Message-ID: Date: Sat, 26 Feb 2022 23:53:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The '__n' local variables in kfifo_{in|out|out_peek}() are declared as *unsigned long* for some strange reason -- the underlying __kfifo_*() functions take *unsigned int* for the corresponding 'len' parameters. Fix those declarations to *unsigned int*... Signed-off-by: Sergey Shtylyov --- This patch is against Linus Torvalds' 'linux.git' repo. include/linux/kfifo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: usb/include/linux/kfifo.h =================================================================== --- usb.orig/include/linux/kfifo.h +++ usb/include/linux/kfifo.h @@ -520,7 +520,7 @@ __kfifo_uint_must_check_helper( \ ({ \ typeof((fifo) + 1) __tmp = (fifo); \ typeof(__tmp->ptr_const) __buf = (buf); \ - unsigned long __n = (n); \ + unsigned int __n = (n); \ const size_t __recsize = sizeof(*__tmp->rectype); \ struct __kfifo *__kfifo = &__tmp->kfifo; \ (__recsize) ?\ @@ -589,7 +589,7 @@ __kfifo_uint_must_check_helper( \ ({ \ typeof((fifo) + 1) __tmp = (fifo); \ typeof(__tmp->ptr) __buf = (buf); \ - unsigned long __n = (n); \ + unsigned int __n = (n); \ const size_t __recsize = sizeof(*__tmp->rectype); \ struct __kfifo *__kfifo = &__tmp->kfifo; \ (__recsize) ?\ @@ -819,7 +819,7 @@ __kfifo_uint_must_check_helper( \ ({ \ typeof((fifo) + 1) __tmp = (fifo); \ typeof(__tmp->ptr) __buf = (buf); \ - unsigned long __n = (n); \ + unsigned int __n = (n); \ const size_t __recsize = sizeof(*__tmp->rectype); \ struct __kfifo *__kfifo = &__tmp->kfifo; \ (__recsize) ? \