Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1018103pxj; Fri, 4 Jun 2021 04:11:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2Zzonaqzu7T8cyyqUz+Hjl/PKrMmq8Hj1oV90YzjEFmtOFZWppTkMfzBMKOl78wrS5fif X-Received: by 2002:a50:eb8f:: with SMTP id y15mr4136451edr.285.1622805089250; Fri, 04 Jun 2021 04:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622805089; cv=none; d=google.com; s=arc-20160816; b=oO5XPal7aFXnqeh73o6cc7CppKPPaHMmhU9J+D+BCQWfWuWLn7XR4hpd38KU7Rrdze 9l04ly8Yl9NEK8r8AjwY3iU2strRaQQCu1pkvZu/F8tzhdxRE7BJjEJWZqTR7JcbgsBc wq3c2hcNewye/630rL6fKpzsV1Q+Q+AdwjfYyAtIcE2c89bhISnOdiqHvFaOYm5fUZyE e4wFkZp9xfDGRkfKm1SB2dvziBMpE//T1iyZVoukbA28RlRZ5t+do44C2PcDJ+zs8pbt NRIiq2qXuqllnb4D5X94A1lVIT6lKJay0Yn+oFN31pnV3j88nT9yhBk12Q3k53ZfiAzh hgLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=3ldh0JYMSfGGjHGqUhCAjT/cU7tl3fy29GOXgPOmajQ=; b=rz84/Rs4iOUrXdyzGtAZ5LqCijyyA2sMR/KhZv9VzjRU54w/VDt1glp6239rkqMFWd jF/vFrXjljx9vBDuWVjb5oThAA79upvnV50iBUv9Jsah0gF6tKgsCCLZnsBVyxn5gVN+ x2Poi3pg6K48AgCO/YMDMFulyrayglAmlTULrkI5OWWBvh1/jodSmo/eXfFc5i0Bgm0M L8mJOndiUeRjzq6jnxnrLHBQDWXpSl5BYXlp75p3mVnyFJt2Ehwv5AEmM4HEk3QE0//3 vkdlDO1ozZgS5lTtJbvh+lz8Cu5k5sZjFLHWHhJN4SiRod4EyX9oCvEvHv1xGolGRT01 LxUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v29si4381103ejk.374.2021.06.04.04.11.05; Fri, 04 Jun 2021 04:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230200AbhFDLL2 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 4 Jun 2021 07:11:28 -0400 Received: from mail-ua1-f52.google.com ([209.85.222.52]:45839 "EHLO mail-ua1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229740AbhFDLL1 (ORCPT ); Fri, 4 Jun 2021 07:11:27 -0400 Received: by mail-ua1-f52.google.com with SMTP id z13so78235uai.12; Fri, 04 Jun 2021 04:09:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=yg1cyMLtFpU6qgef10zjsDeHfF/JPKqUg0hmm8OFcD0=; b=j+x5EDx+K0gxRP+qs+ShqEoYwtfv0O/88CsqxzuuqR/v69VGwtocaf4NRALbdjhXyu 9MZ8pRo0YYrCajWhVyd6rZCZHW06l1WLCvcycptMXpu23pwJtZduOZ+whlpZ47q2OpQk SxXcigqyLZ82QiqLaMj5cWgmtPFNVcAJUbt/EvdkbLZ5rXcr36YL4zJC4kLeiSa6iVB/ 7BqNbyuUMOsL0wWwL7E6Va2VTmi91r2ZhTcy5tKyVdfLL4vVSK63ArIoL10Gh+PinsAa 51p2h8DhQtngXhmFJUp+TVSuoJUD+y/NWwOuv//aJ1Gs++WNwMzLxnfSnJH+yFZk4XWy NUlw== X-Gm-Message-State: AOAM530FI7/FBnNwa1YrGRp4m/ObP8Wb1i3wN8tm/jCy70U5vpIn/c4P opMlUlO4EUhakwdyAnqI9kalP/JiSQmcKGidGaI= X-Received: by 2002:ab0:708c:: with SMTP id m12mr2824270ual.4.1622804966645; Fri, 04 Jun 2021 04:09:26 -0700 (PDT) MIME-Version: 1.0 References: <20210604090219.385504-1-geert@linux-m68k.org> In-Reply-To: From: Geert Uytterhoeven Date: Fri, 4 Jun 2021 13:09:15 +0200 Message-ID: Subject: Re: [EXTERNAL] [PATCH] cifs: Change cifs_ses.chans_need_reconnect and chan_index to "unsigned long" To: Shyam Prasad Cc: Steve French , "linux-cifs@vger.kernel.org" , "linux-next@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Stephen Rothwell Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shyam, On Fri, Jun 4, 2021 at 12:41 PM Shyam Prasad wrote: > Thanks for the email. > I've already submitted the fix for this. You should see this fixed tomorrow. Where can I find these submitted fixes? As per linux-next policy[1], commits in linux-next should be posted to the relevant mailing list first, which is linux-cifs, AFAIK. Thanks! [1] https://lore.kernel.org/linux-next/20210430174733.5a31d0c6@canb.auug.org.au/ > -----Original Message----- > From: Geert Uytterhoeven > Sent: Friday, June 4, 2021 2:32 PM > To: Steve French ; Shyam Prasad > Cc: linux-cifs@vger.kernel.org; linux-next@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: [EXTERNAL] [PATCH] cifs: Change cifs_ses.chans_need_reconnect and chan_index to "unsigned long" > > On 32-bit (e.g. m68k): > > fs/cifs/cifssmb.c: In function ‘cifs_reconnect_tcon’: > ./include/linux/kern_levels.h:5:18: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] > fs/cifs/cifssmb.c:201:42: note: format string is defined here > 201 | cifs_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d", > | ~~^ > | | > | long unsigned int > | %x > > fs/cifs/transport.c: In function ‘cifs_pick_channel’: > fs/cifs/cifsglob.h:955:20: error: passing argument 2 of ‘test_bit’ from incompatible pointer type [-Werror=incompatible-pointer-types] > 955 | test_bit((index), &(ses)->chans_need_reconnect) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > | | > | size_t * {aka unsigned int *} > ./arch/m68k/include/asm/bitops.h:151:66: note: expected ‘const volatile long unsigned int *’ but argument is of type ‘size_t *’ {aka ‘unsigned int *’} > 151 | static inline int test_bit(int nr, const volatile unsigned long *vaddr) > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ > > fs/cifs/sess.c: In function ‘cifs_chan_set_need_reconnect’: > fs/cifs/sess.c:98:22: error: passing argument 2 of ‘bset_mem_set_bit’ from incompatible pointer type [-Werror=incompatible-pointer-types] > 98 | set_bit(chan_index, &ses->chans_need_reconnect); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > | | > | size_t * {aka unsigned int *} > ./arch/m68k/include/asm/bitops.h:41:69: note: expected ‘volatile long unsigned int *’ but argument is of type ‘size_t *’ {aka ‘unsigned int *’} > 41 | static inline void bset_mem_set_bit(int nr, volatile unsigned long *vaddr) > | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ > fs/cifs/sess.c:98:22: error: passing argument 2 of ‘bfset_mem_set_bit’ from incompatible pointer type [-Werror=incompatible-pointer-types] > 98 | set_bit(chan_index, &ses->chans_need_reconnect); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > | | > | size_t * {aka unsigned int *} > ./arch/m68k/include/asm/bitops.h:50:70: note: expected ‘volatile long unsigned int *’ but argument is of type ‘size_t *’ {aka ‘unsigned int *’} > 50 | static inline void bfset_mem_set_bit(int nr, volatile unsigned long *vaddr) > | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ > > [...] > > As bitops can only operate on long objects, and > cifs_ses_get_chan_index() already returns "unsigned long", fix this by changing cifs_ses.chans_need_reconnect and chan_index from "size_t" to "unsigned long". > > Fixes: 374c6c7bba3cbaa1 ("cifs: changes to support multichannel during channel reconnect") > Reported-by: noreply@ellerman.id.au > Signed-off-by: Geert Uytterhoeven > --- > Can you please add Link: headers when committing patches? > I could not find this patch in the lore archives of linux-cifs or linux-fsdevel, presumably it was posted elsewhere? > Thanks! > --- > fs/cifs/cifsglob.h | 2 +- > fs/cifs/sess.c | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 8fea2ddd2bd7af26..a9c026af21e1e9d1 100644 > --- a/fs/cifs/cifsglob.h > +++ b/fs/cifs/cifsglob.h > @@ -968,7 +968,7 @@ struct cifs_ses { > * enable the sessions on top to continue to live till any > * of the channels below are active. > */ > - size_t chans_need_reconnect; > + unsigned long chans_need_reconnect; > }; > > static inline bool > diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 1721a3b246942266..1a17ddd6abbe5778 100644 > --- a/fs/cifs/sess.c > +++ b/fs/cifs/sess.c > @@ -94,7 +94,7 @@ void > cifs_chan_set_need_reconnect(struct cifs_ses *ses, > struct TCP_Server_Info *server) { > - size_t chan_index = cifs_ses_get_chan_index(ses, server); > + unsigned long chan_index = cifs_ses_get_chan_index(ses, server); > set_bit(chan_index, &ses->chans_need_reconnect); > cifs_dbg(FYI, "Set reconnect bitmask for chan %lu; now 0x%lx\n", > chan_index, ses->chans_need_reconnect); @@ -104,7 +104,7 @@ void cifs_chan_clear_need_reconnect(struct cifs_ses *ses, > struct TCP_Server_Info *server) { > - size_t chan_index = cifs_ses_get_chan_index(ses, server); > + unsigned long chan_index = cifs_ses_get_chan_index(ses, server); > clear_bit(chan_index, &ses->chans_need_reconnect); > cifs_dbg(FYI, "Cleared reconnect bitmask for chan %lu; now 0x%lx\n", > chan_index, ses->chans_need_reconnect); @@ -114,7 +114,7 @@ bool cifs_chan_needs_reconnect(struct cifs_ses *ses, > struct TCP_Server_Info *server) > { > - size_t chan_index = cifs_ses_get_chan_index(ses, server); > + unsigned long chan_index = cifs_ses_get_chan_index(ses, server); > return CIFS_CHAN_NEEDS_RECONNECT(ses, chan_index); } Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds