Content-Type: multipart/mixed; boundary="===============0679609556128021121==" MIME-Version: 1.0 From: Dan Carpenter To: kbuild-all@lists.01.org Subject: Re: [PATCH v3 3/6] staging: r8188eu: add error handling of rtw_read8 Date: Wed, 25 Aug 2021 16:34:32 +0300 Message-ID: <20210825133432.GW1931@kadam> In-Reply-To: List-Id: --===============0679609556128021121== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Wed, Aug 25, 2021 at 04:02:26PM +0300, Pavel Skripkin wrote: > > This is not related to your patch. Ignore it. > > = > > = > > > > vim +2022 drivers/staging/r8188eu/hal/usb_halinit.c > > > > > > > = > > > > 2020 case HW_VAR_BCN_VALID: > > > > 2021 /* BCN_VALID, BIT(16) of REG_TDECTRL =3D BIT(0) of REG_TD= ECTRL+2, write 1 to clear, Clear by sw */ > > > > > 2022 u8 tmp; > > > = > > > Hm, I don't know anything about ARM compilers, so should I wrap this = code > > > block with {}? > > = > > Yep. > > = > > > = > > > My local gcc 11.1.1 (x86_64) does not produce any warnings/errors > > > = > > = > > You should figure out whats up with that because it shouldn't compile > > with the gcc options that the kernel uses. > > = > = > AFAIK, at least 2 guys except me in this CC list compiled my series witho= ut > errors/warnings. Maybe, staging tree is missing some Makefile updates? > = > = > I'll resend series this evening anyway, but this is strange.... Hm... In my version of GCC the error is: drivers/staging/r8188eu/hal/usb_halinit.c:1870:3: error: a label can only b= e part of a statement and a declaration is not a statement That's a different error from what I was expecting. It's caused by having a declaration directly after a case statement. The warning that I was expecting was from -Wdeclaration-after-statement and it looks like this: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-s= tatement] You really should try investigate why this compiles for you because something is going wrong. It should not build without a warning. regards, dan carpenter --===============0679609556128021121==--