driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] staging: rtl8712: Code simplifications
@ 2020-07-05  0:22 Mauro Dreissig
  2020-07-05  0:22 ` [PATCH 1/5] staging: rtl8712: Replace constant 49152 with expression 48 * 1024 Mauro Dreissig
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Mauro Dreissig @ 2020-07-05  0:22 UTC (permalink / raw)
  To: gregkh, Larry.Finger, florian.c.schilhabel, driverdev-devel

This series applies some code enhancements to rtl8712 staging driver.

Mauro Dreissig (5):
  staging: rtl8712: Replace constant 49152 with expression 48 * 1024
  staging: rtl8712: Simplify expressions with boolean logic
  staging: rtl8712: Use ETH_ALEN instead of hardcoded value
  staging: rtl8712: Remove variable 'raw' from rtl871x_open_fw()
  staging: rtl8712: Use proper format in call to dev_err()

 drivers/staging/rtl8712/hal_init.c     | 18 ++++++++----------
 drivers/staging/rtl8712/osdep_intf.h   |  2 +-
 drivers/staging/rtl8712/rtl8712_recv.c |  5 ++---
 3 files changed, 11 insertions(+), 14 deletions(-)

-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/5] staging: rtl8712: Replace constant 49152 with expression 48 * 1024
  2020-07-05  0:22 [PATCH 0/5] staging: rtl8712: Code simplifications Mauro Dreissig
@ 2020-07-05  0:22 ` Mauro Dreissig
  2020-07-05  0:22 ` [PATCH 2/5] staging: rtl8712: Simplify expressions with boolean logic Mauro Dreissig
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Mauro Dreissig @ 2020-07-05  0:22 UTC (permalink / raw)
  To: gregkh, Larry.Finger, florian.c.schilhabel, driverdev-devel

This way we don't need the comment stating that 49152 equals 48k.

Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
---
 drivers/staging/rtl8712/hal_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
index 7293cdc3a43b..1f5ba9cbe951 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -27,7 +27,7 @@
 #include "usb_osintf.h"
 
 #define FWBUFF_ALIGN_SZ 512
-#define MAX_DUMP_FWSZ	49152 /*default = 49152 (48k)*/
+#define MAX_DUMP_FWSZ (48 * 1024)
 
 static void rtl871x_load_fw_cb(const struct firmware *firmware, void *context)
 {
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/5] staging: rtl8712: Simplify expressions with boolean logic
  2020-07-05  0:22 [PATCH 0/5] staging: rtl8712: Code simplifications Mauro Dreissig
  2020-07-05  0:22 ` [PATCH 1/5] staging: rtl8712: Replace constant 49152 with expression 48 * 1024 Mauro Dreissig
@ 2020-07-05  0:22 ` Mauro Dreissig
  2020-07-05  0:22 ` [PATCH 3/5] staging: rtl8712: Use ETH_ALEN instead of hardcoded value Mauro Dreissig
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Mauro Dreissig @ 2020-07-05  0:22 UTC (permalink / raw)
  To: gregkh, Larry.Finger, florian.c.schilhabel, driverdev-devel

Simplify some expressions by using boolean operations.

Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
---
 drivers/staging/rtl8712/hal_init.c     | 4 ++--
 drivers/staging/rtl8712/osdep_intf.h   | 2 +-
 drivers/staging/rtl8712/rtl8712_recv.c | 5 ++---
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
index 1f5ba9cbe951..d3fc6fa9a715 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -99,12 +99,12 @@ static void fill_fwpriv(struct _adapter *adapter, struct fw_priv *fwpriv)
 	default:
 		fwpriv->rf_config = RTL8712_RFC_1T2R;
 	}
-	fwpriv->mp_mode = (regpriv->mp_mode == 1) ? 1 : 0;
+	fwpriv->mp_mode = (regpriv->mp_mode == 1);
 	/* 0:off 1:on 2:auto */
 	fwpriv->vcs_type = regpriv->vrtl_carrier_sense;
 	fwpriv->vcs_mode = regpriv->vcs_type; /* 1:RTS/CTS 2:CTS to self */
 	/* default enable turbo_mode */
-	fwpriv->turbo_mode = ((regpriv->wifi_test == 1) ? 0 : 1);
+	fwpriv->turbo_mode = (regpriv->wifi_test != 1);
 	fwpriv->low_power_mode = regpriv->low_power;
 }
 
diff --git a/drivers/staging/rtl8712/osdep_intf.h b/drivers/staging/rtl8712/osdep_intf.h
index 2cc25db1a91d..9e75116c987e 100644
--- a/drivers/staging/rtl8712/osdep_intf.h
+++ b/drivers/staging/rtl8712/osdep_intf.h
@@ -17,7 +17,7 @@
 #include "osdep_service.h"
 #include "drv_types.h"
 
-#define RND4(x)	(((x >> 2) + (((x & 3) == 0) ?  0 : 1)) << 2)
+#define RND4(x)	(((x >> 2) + ((x & 3) != 0)) << 2)
 
 struct intf_priv {
 	u8 *intf_dev;
diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c
index c513cda2a49e..d83f421acfc1 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.c
+++ b/drivers/staging/rtl8712/rtl8712_recv.c
@@ -143,9 +143,8 @@ static void update_recvframe_attrib_from_recvstat(struct rx_pkt_attrib *pattrib,
 	/*TODO:
 	 * Offset 0
 	 */
-	pattrib->bdecrypted = ((le32_to_cpu(prxstat->rxdw0) & BIT(27)) >> 27)
-				 ? 0 : 1;
-	pattrib->crc_err = (le32_to_cpu(prxstat->rxdw0) & BIT(14)) >> 14;
+	pattrib->bdecrypted = (le32_to_cpu(prxstat->rxdw0) & BIT(27)) == 0;
+	pattrib->crc_err = (le32_to_cpu(prxstat->rxdw0) & BIT(14)) != 0;
 	/*Offset 4*/
 	/*Offset 8*/
 	/*Offset 12*/
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/5] staging: rtl8712: Use ETH_ALEN instead of hardcoded value
  2020-07-05  0:22 [PATCH 0/5] staging: rtl8712: Code simplifications Mauro Dreissig
  2020-07-05  0:22 ` [PATCH 1/5] staging: rtl8712: Replace constant 49152 with expression 48 * 1024 Mauro Dreissig
  2020-07-05  0:22 ` [PATCH 2/5] staging: rtl8712: Simplify expressions with boolean logic Mauro Dreissig
@ 2020-07-05  0:22 ` Mauro Dreissig
  2020-07-05  0:22 ` [PATCH 4/5] staging: rtl8712: Remove variable 'raw' from rtl871x_open_fw() Mauro Dreissig
  2020-07-05  0:22 ` [PATCH 5/5] staging: rtl8712: Use proper format in call to dev_err() Mauro Dreissig
  4 siblings, 0 replies; 8+ messages in thread
From: Mauro Dreissig @ 2020-07-05  0:22 UTC (permalink / raw)
  To: gregkh, Larry.Finger, florian.c.schilhabel, driverdev-devel

Use macro ETH_ALEN which defines the number of octets in
an ethernet address.

Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
---
 drivers/staging/rtl8712/hal_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
index d3fc6fa9a715..d53efdfc9bf0 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -343,7 +343,7 @@ uint rtl8712_hal_init(struct _adapter *padapter)
 	/* Fix the RX FIFO issue(USB error) */
 	r8712_write8(padapter, 0x1025fe5C, r8712_read8(padapter, 0x1025fe5C)
 		     | BIT(7));
-	for (i = 0; i < 6; i++)
+	for (i = 0; i < ETH_ALEN; i++)
 		padapter->eeprompriv.mac_addr[i] = r8712_read8(padapter,
 							       MACID + i);
 	return _SUCCESS;
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/5] staging: rtl8712: Remove variable 'raw' from rtl871x_open_fw()
  2020-07-05  0:22 [PATCH 0/5] staging: rtl8712: Code simplifications Mauro Dreissig
                   ` (2 preceding siblings ...)
  2020-07-05  0:22 ` [PATCH 3/5] staging: rtl8712: Use ETH_ALEN instead of hardcoded value Mauro Dreissig
@ 2020-07-05  0:22 ` Mauro Dreissig
  2020-07-05  0:22 ` [PATCH 5/5] staging: rtl8712: Use proper format in call to dev_err() Mauro Dreissig
  4 siblings, 0 replies; 8+ messages in thread
From: Mauro Dreissig @ 2020-07-05  0:22 UTC (permalink / raw)
  To: gregkh, Larry.Finger, florian.c.schilhabel, driverdev-devel

Remove useless variable 'raw' from function rtl871x_open_fw()
making the code a bit easier to understand.

Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
---
 drivers/staging/rtl8712/hal_init.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
index d53efdfc9bf0..d7b30152d409 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -67,15 +67,13 @@ MODULE_FIRMWARE("rtlwifi/rtl8712u.bin");
 
 static u32 rtl871x_open_fw(struct _adapter *adapter, const u8 **mappedfw)
 {
-	const struct firmware **raw = &adapter->fw;
-
 	if (adapter->fw->size > 200000) {
 		dev_err(&adapter->pnetdev->dev, "r8172u: Badfw->size of %d\n",
 			(int)adapter->fw->size);
 		return 0;
 	}
-	*mappedfw = (*raw)->data;
-	return (*raw)->size;
+	*mappedfw = adapter->fw->data;
+	return adapter->fw->size;
 }
 
 static void fill_fwpriv(struct _adapter *adapter, struct fw_priv *fwpriv)
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/5] staging: rtl8712: Use proper format in call to dev_err()
  2020-07-05  0:22 [PATCH 0/5] staging: rtl8712: Code simplifications Mauro Dreissig
                   ` (3 preceding siblings ...)
  2020-07-05  0:22 ` [PATCH 4/5] staging: rtl8712: Remove variable 'raw' from rtl871x_open_fw() Mauro Dreissig
@ 2020-07-05  0:22 ` Mauro Dreissig
  2020-07-05  2:32   ` kernel test robot
  2020-07-08  1:17   ` kernel test robot
  4 siblings, 2 replies; 8+ messages in thread
From: Mauro Dreissig @ 2020-07-05  0:22 UTC (permalink / raw)
  To: gregkh, Larry.Finger, florian.c.schilhabel, driverdev-devel

Use %lu in the format string instead of casting the argument to an int.

Also fix driver name in the format string.

Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
---
 drivers/staging/rtl8712/hal_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
index d7b30152d409..018d8f0e34ee 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -68,8 +68,8 @@ MODULE_FIRMWARE("rtlwifi/rtl8712u.bin");
 static u32 rtl871x_open_fw(struct _adapter *adapter, const u8 **mappedfw)
 {
 	if (adapter->fw->size > 200000) {
-		dev_err(&adapter->pnetdev->dev, "r8172u: Badfw->size of %d\n",
-			(int)adapter->fw->size);
+		dev_err(&adapter->pnetdev->dev, "r8712u: Bad fw->size of %lu\n",
+			adapter->fw->size);
 		return 0;
 	}
 	*mappedfw = adapter->fw->data;
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 5/5] staging: rtl8712: Use proper format in call to dev_err()
  2020-07-05  0:22 ` [PATCH 5/5] staging: rtl8712: Use proper format in call to dev_err() Mauro Dreissig
@ 2020-07-05  2:32   ` kernel test robot
  2020-07-08  1:17   ` kernel test robot
  1 sibling, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-07-05  2:32 UTC (permalink / raw)
  To: Mauro Dreissig, gregkh, Larry.Finger, florian.c.schilhabel,
	driverdev-devel
  Cc: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2659 bytes --]

Hi Mauro,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Mauro-Dreissig/staging-rtl8712-Code-simplifications/20200705-082433
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 14442181d20490945f341644bb8257e334b01447
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/usb/ch9.h:36,
                    from include/linux/usb.h:6,
                    from drivers/staging/rtl8712/hal_init.c:19:
   drivers/staging/rtl8712/hal_init.c: In function 'rtl871x_open_fw':
>> drivers/staging/rtl8712/hal_init.c:71:35: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'const unsigned int'} [-Wformat=]
      71 |   dev_err(&adapter->pnetdev->dev, "r8712u: Bad fw->size of %lu\n",
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
>> drivers/staging/rtl8712/hal_init.c:71:3: note: in expansion of macro 'dev_err'
      71 |   dev_err(&adapter->pnetdev->dev, "r8712u: Bad fw->size of %lu\n",
         |   ^~~~~~~
   drivers/staging/rtl8712/hal_init.c:71:62: note: format string is defined here
      71 |   dev_err(&adapter->pnetdev->dev, "r8712u: Bad fw->size of %lu\n",
         |                                                            ~~^
         |                                                              |
         |                                                              long unsigned int
         |                                                            %u

vim +71 drivers/staging/rtl8712/hal_init.c

    67	
    68	static u32 rtl871x_open_fw(struct _adapter *adapter, const u8 **mappedfw)
    69	{
    70		if (adapter->fw->size > 200000) {
  > 71			dev_err(&adapter->pnetdev->dev, "r8712u: Bad fw->size of %lu\n",
    72				adapter->fw->size);
    73			return 0;
    74		}
    75		*mappedfw = adapter->fw->data;
    76		return adapter->fw->size;
    77	}
    78	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 74085 bytes --]

[-- Attachment #3: Type: text/plain, Size: 169 bytes --]

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 5/5] staging: rtl8712: Use proper format in call to dev_err()
  2020-07-05  0:22 ` [PATCH 5/5] staging: rtl8712: Use proper format in call to dev_err() Mauro Dreissig
  2020-07-05  2:32   ` kernel test robot
@ 2020-07-08  1:17   ` kernel test robot
  1 sibling, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-07-08  1:17 UTC (permalink / raw)
  To: Mauro Dreissig, gregkh, Larry.Finger, florian.c.schilhabel,
	driverdev-devel
  Cc: clang-built-linux, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 8215 bytes --]

Hi Mauro,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Mauro-Dreissig/staging-rtl8712-Code-simplifications/20200705-082433
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 14442181d20490945f341644bb8257e334b01447
config: powerpc64-randconfig-r006-20200707 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/staging/rtl8712/hal_init.c:19:
   In file included from include/linux/usb.h:16:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:182:1: note: expanded from here
   __do_insw
   ^
   arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
   #define __do_insw(p, b, n)      readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/staging/rtl8712/hal_init.c:19:
   In file included from include/linux/usb.h:16:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:184:1: note: expanded from here
   __do_insl
   ^
   arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
   #define __do_insl(p, b, n)      readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/staging/rtl8712/hal_init.c:19:
   In file included from include/linux/usb.h:16:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:186:1: note: expanded from here
   __do_outsb
   ^
   arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
   #define __do_outsb(p, b, n)     writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/staging/rtl8712/hal_init.c:19:
   In file included from include/linux/usb.h:16:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:188:1: note: expanded from here
   __do_outsw
   ^
   arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
   #define __do_outsw(p, b, n)     writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/staging/rtl8712/hal_init.c:19:
   In file included from include/linux/usb.h:16:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:604:
   arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:190:1: note: expanded from here
   __do_outsl
   ^
   arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
   #define __do_outsl(p, b, n)     writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
>> drivers/staging/rtl8712/hal_init.c:72:4: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
                           adapter->fw->size);
                           ^~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:104:32: note: expanded from macro 'dev_err'
           _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
                                 ~~~     ^~~~~~~~~~~
   7 warnings generated.

vim +72 drivers/staging/rtl8712/hal_init.c

    67	
    68	static u32 rtl871x_open_fw(struct _adapter *adapter, const u8 **mappedfw)
    69	{
    70		if (adapter->fw->size > 200000) {
    71			dev_err(&adapter->pnetdev->dev, "r8712u: Bad fw->size of %lu\n",
  > 72				adapter->fw->size);
    73			return 0;
    74		}
    75		*mappedfw = adapter->fw->data;
    76		return adapter->fw->size;
    77	}
    78	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35401 bytes --]

[-- Attachment #3: Type: text/plain, Size: 169 bytes --]

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-07-08  1:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-05  0:22 [PATCH 0/5] staging: rtl8712: Code simplifications Mauro Dreissig
2020-07-05  0:22 ` [PATCH 1/5] staging: rtl8712: Replace constant 49152 with expression 48 * 1024 Mauro Dreissig
2020-07-05  0:22 ` [PATCH 2/5] staging: rtl8712: Simplify expressions with boolean logic Mauro Dreissig
2020-07-05  0:22 ` [PATCH 3/5] staging: rtl8712: Use ETH_ALEN instead of hardcoded value Mauro Dreissig
2020-07-05  0:22 ` [PATCH 4/5] staging: rtl8712: Remove variable 'raw' from rtl871x_open_fw() Mauro Dreissig
2020-07-05  0:22 ` [PATCH 5/5] staging: rtl8712: Use proper format in call to dev_err() Mauro Dreissig
2020-07-05  2:32   ` kernel test robot
2020-07-08  1:17   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).