Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1359502pxm; Sat, 26 Feb 2022 12:56:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6G5mw/gG5UM+ZKJpUWcPz189n2EoQY88A7X/v8mpjgPs+c43NCcPcdOPqxUFsa1WWF2Zf X-Received: by 2002:a62:fb0d:0:b0:4f1:a584:71f with SMTP id x13-20020a62fb0d000000b004f1a584071fmr14252325pfm.2.1645908962843; Sat, 26 Feb 2022 12:56:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645908962; cv=none; d=google.com; s=arc-20160816; b=OVS6RzmVwUZEn8Up4EEMKCqFGgKP4h700tfeRzbjrAGVV1vXhPuqvxaRmJy6sVD4a2 3Jgq1Uh8g5GBszGMLNZt0GaZesJTUXLhKXETlZ2muFs4dhJsEpWZLBz8cIgQSkRBAw0o Rv8jvWaNGQoslzKEFyxUC5N5y1OdGIM8r/sQwCwLxLAk7Q1B9OWp1Y67l/3porSQCnxj 5zBdjckIqSAfQZtHrtAnSTMpGPw9LAHeWIpBT6YuS+9KljyQ2tZN2Y8g12xHQrkOQddc Rl1wkys1CnSQHLJ0KUpnb3AI/WnFYs2WBT0KN7RpD/vpVYuySqWzjX5oI8Pe64DSugzl XWgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:user-agent:date:message-id:organization:subject:from :to:dkim-filter; bh=+mTVlljJT5okwPb4jJyZ6BKCB6VRfOTlbzlmQ+VJuxA=; b=GzHEKD+WB/SFsxETvb7rnK9Ma2HjK5uLcWpFAsmm2DFZNjoXeleYTkSIfQFJeCpOGE 2uNMvJlnAvyXggXngWDoYFSaBoR0aiZuL6VGb9qXhKBnWcXvXgYbRt0b/EerQeO2Z4ey LFVvVX5cQEIP3VzkyQlU53I5vJxOMR1pFJustffffskz5lLhZKfaybubYnWICYJkClVW me6xZh3Xs2kI+6PuuZYwib5uiMXMSfI2saRVOVeJZwoQhPhWk7pM1SX6/d3k6Ufl44RS 1SxnfQsk/n/IW/arBXXI/VWR9UhGjflSR/6paPkzFhU/ccRLeslCoTOI7gsLW52Cnwhv EtsA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d34-20020a631d62000000b0037306863f64si5522321pgm.701.2022.02.26.12.56.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Feb 2022 12:56:02 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 77E021AE642; Sat, 26 Feb 2022 12:53:44 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229667AbiBZUyR (ORCPT + 99 others); Sat, 26 Feb 2022 15:54:17 -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) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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) ? \