linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well.
@ 2016-01-11  9:02 Manjeet Pawar
  2016-01-11 14:10 ` Sergei Shtylyov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Manjeet Pawar @ 2016-01-11  9:02 UTC (permalink / raw)
  To: davem, paul.gortmaker, schmitzmic, geert, nico, netdev,
	linux-kernel, manjeet.p, akhilesh.k
  Cc: pankaj.m

This patch enable network driver support for ARM64

Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
Signed-off-by: Manjeet Pawar <manjeet.p@samsung.com>
---
 drivers/net/ethernet/smsc/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig
index eb9230e..6e73c73 100644
--- a/drivers/net/ethernet/smsc/Kconfig
+++ b/drivers/net/ethernet/smsc/Kconfig
@@ -77,7 +77,7 @@ config SMC911X
 	tristate "SMSC LAN911[5678] support"
 	select CRC32
 	select MII
-	depends on (ARM || SUPERH || MN10300)
+	depends on (ARM || ARM64 || SUPERH || MN10300)
 	---help---
 	  This is a driver for SMSC's LAN911x series of Ethernet chipsets
 	  including the new LAN9115, LAN9116, LAN9117, and LAN9118.
-- 
1.7.9.5

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

* Re: [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well.
  2016-01-11  9:02 [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well Manjeet Pawar
@ 2016-01-11 14:10 ` Sergei Shtylyov
  2016-01-11 15:16 ` Paul Gortmaker
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2016-01-11 14:10 UTC (permalink / raw)
  To: Manjeet Pawar, davem, paul.gortmaker, schmitzmic, geert, nico,
	netdev, linux-kernel, akhilesh.k
  Cc: pankaj.m

Hello.

On 01/11/2016 12:02 PM, Manjeet Pawar wrote:

> This patch enable network driver support for ARM64
>
> Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
> Signed-off-by: Manjeet Pawar <manjeet.p@samsung.com>
> ---
>   drivers/net/ethernet/smsc/Kconfig |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig
> index eb9230e..6e73c73 100644
> --- a/drivers/net/ethernet/smsc/Kconfig
> +++ b/drivers/net/ethernet/smsc/Kconfig
> @@ -77,7 +77,7 @@ config SMC911X
>   	tristate "SMSC LAN911[5678] support"
>   	select CRC32
>   	select MII
> -	depends on (ARM || SUPERH || MN10300)
> +	depends on (ARM || ARM64 || SUPERH || MN10300)

    Could as well drop useless parens...

[...]

MBR, Sergei

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

* Re: [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well.
  2016-01-11  9:02 [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well Manjeet Pawar
  2016-01-11 14:10 ` Sergei Shtylyov
@ 2016-01-11 15:16 ` Paul Gortmaker
  2016-01-11 22:32 ` kbuild test robot
  2016-01-11 22:45 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Gortmaker @ 2016-01-11 15:16 UTC (permalink / raw)
  To: Manjeet Pawar, davem, schmitzmic, geert, nico, netdev,
	linux-kernel, akhilesh.k
  Cc: pankaj.m

On 2016-01-11 04:02 AM, Manjeet Pawar wrote:
> This patch enable network driver support for ARM64

Your commit log only repeats what is obvious from the one line
change itself.  It might be nice to indicate what platform it
was validated on, what tests were run and what features of the
driver were exercised (multicast, netpoll, ...)

Imagine if I sent you a similar patch where I added MIPS and
said nothing more than "enable network driver support for MIPS"
and Cc'd you expecting you to comment on whether it was OK.

Thanks,
Paul.
--

> 
> Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
> Signed-off-by: Manjeet Pawar <manjeet.p@samsung.com>
> ---
>  drivers/net/ethernet/smsc/Kconfig |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig
> index eb9230e..6e73c73 100644
> --- a/drivers/net/ethernet/smsc/Kconfig
> +++ b/drivers/net/ethernet/smsc/Kconfig
> @@ -77,7 +77,7 @@ config SMC911X
>  	tristate "SMSC LAN911[5678] support"
>  	select CRC32
>  	select MII
> -	depends on (ARM || SUPERH || MN10300)
> +	depends on (ARM || ARM64 || SUPERH || MN10300)
>  	---help---
>  	  This is a driver for SMSC's LAN911x series of Ethernet chipsets
>  	  including the new LAN9115, LAN9116, LAN9117, and LAN9118.
> 

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

* Re: [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well.
  2016-01-11  9:02 [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well Manjeet Pawar
  2016-01-11 14:10 ` Sergei Shtylyov
  2016-01-11 15:16 ` Paul Gortmaker
@ 2016-01-11 22:32 ` kbuild test robot
  2016-01-11 22:45 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2016-01-11 22:32 UTC (permalink / raw)
  To: Manjeet Pawar
  Cc: kbuild-all, davem, paul.gortmaker, schmitzmic, geert, nico,
	netdev, linux-kernel, manjeet.p, akhilesh.k, pankaj.m

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

Hi Manjeet,

[auto build test WARNING on net-next/master]
[also build test WARNING on v4.4 next-20160111]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Manjeet-Pawar/smsc-Enabling-SMSC-LAN911-driver-for-ARM64-as-well/20160111-170643
config: arm64-allmodconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm64 

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/smsc/smc911x.c: In function 'smc911x_hardware_send_pkt':
>> drivers/net/ethernet/smsc/smc911x.c:475:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     buf = (char*)((u32)skb->data & ~0x3);
                   ^
>> drivers/net/ethernet/smsc/smc911x.c:475:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     buf = (char*)((u32)skb->data & ~0x3);
           ^
   drivers/net/ethernet/smsc/smc911x.c:476:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     len = (skb->len + 3 + ((u32)skb->data & 3)) & ~0x3;
                            ^
   drivers/net/ethernet/smsc/smc911x.c:477:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     cmdA = (((u32)skb->data & 0x3) << 16) |
              ^

vim +475 drivers/net/ethernet/smsc/smc911x.c

dcdf8710 drivers/net/ethernet/smsc/smc911x.c Ben Boeckel     2013-11-01  459  	DBG(SMC_DEBUG_FUNC | SMC_DEBUG_TX, dev, "--> %s\n", __func__);
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  460  	BUG_ON(lp->pending_tx_skb == NULL);
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  461  
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  462  	skb = lp->pending_tx_skb;
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  463  	lp->pending_tx_skb = NULL;
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  464  
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  465  	/* cmdA {25:24] data alignment [20:16] start offset [10:0] buffer length */
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  466  	/* cmdB {31:16] pkt tag [10:0] length */
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  467  #ifdef SMC_USE_DMA
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  468  	/* 16 byte buffer alignment mode */
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  469  	buf = (char*)((u32)(skb->data) & ~0xF);
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  470  	len = (skb->len + 0xF + ((u32)skb->data & 0xF)) & ~0xF;
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  471  	cmdA = (1<<24) | (((u32)skb->data & 0xF)<<16) |
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  472  			TX_CMD_A_INT_FIRST_SEG_ | TX_CMD_A_INT_LAST_SEG_ |
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  473  			skb->len;
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  474  #else
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19 @475  	buf = (char*)((u32)skb->data & ~0x3);
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  476  	len = (skb->len + 3 + ((u32)skb->data & 3)) & ~0x3;
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  477  	cmdA = (((u32)skb->data & 0x3) << 16) |
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  478  			TX_CMD_A_INT_FIRST_SEG_ | TX_CMD_A_INT_LAST_SEG_ |
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  479  			skb->len;
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  480  #endif
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  481  	/* tag is packet length so we can use this in stats update later */
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  482  	cmdB = (skb->len  << 16) | (skb->len & 0x7FF);
0a0c72c9 drivers/net/smc911x.c               Dustin McIntire 2006-04-19  483  

:::::: The code at line 475 was first introduced by commit
:::::: 0a0c72c9118c4e63080eb409f0cfdf15808d23a4 [PATCH] RE: [PATCH 1/1] net driver: Add support for SMSC LAN911x line of ethernet chips

:::::: TO: Dustin McIntire <dustin@sensoria.com>
:::::: CC: Jeff Garzik <jeff@garzik.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 46847 bytes --]

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

* Re: [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well.
  2016-01-11  9:02 [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well Manjeet Pawar
                   ` (2 preceding siblings ...)
  2016-01-11 22:32 ` kbuild test robot
@ 2016-01-11 22:45 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2016-01-11 22:45 UTC (permalink / raw)
  To: manjeet.p
  Cc: paul.gortmaker, schmitzmic, geert, nico, netdev, linux-kernel,
	akhilesh.k, pankaj.m

From: Manjeet Pawar <manjeet.p@samsung.com>
Date: Mon, 11 Jan 2016 14:32:25 +0530

> This patch enable network driver support for ARM64
> 
> Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
> Signed-off-by: Manjeet Pawar <manjeet.p@samsung.com>

There is no _WAY_ this is valid.

This driver casts skb->data pointers to "u32" integers
and then casts it back to a pointer and proceeds to
dereference that pointer.

I don't think you even looked at the build when trying to
compile this on a 64-bit machine.

That makes me have absolutely no confidence in the changes
you submit to me.

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

end of thread, other threads:[~2016-01-11 22:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-11  9:02 [PATCH 1/1] smsc: Enabling SMSC LAN911 driver for ARM64 as well Manjeet Pawar
2016-01-11 14:10 ` Sergei Shtylyov
2016-01-11 15:16 ` Paul Gortmaker
2016-01-11 22:32 ` kbuild test robot
2016-01-11 22:45 ` David Miller

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).