All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] cdc_ncm: Implement the 32-bit version of NCM Transfer Block
Date: Fri, 06 Mar 2020 09:36:20 +0800	[thread overview]
Message-ID: <202003060913.E4MPe30b%lkp@intel.com> (raw)
In-Reply-To: <20200305203318.8980-1-bay@hackerdom.ru>

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

Hi Alexander,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on linus/master v5.6-rc4 next-20200305]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Alexander-Bersenev/cdc_ncm-Implement-the-32-bit-version-of-NCM-Transfer-Block/20200306-061934
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=parisc 

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

All warnings (new ones prefixed by >>):

   In file included from include/linux/byteorder/big_endian.h:5:0,
                    from arch/parisc/include/uapi/asm/byteorder.h:5,
                    from arch/parisc/include/asm/bitops.h:11,
                    from include/linux/bitops.h:29,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from drivers/net/usb/cdc_ncm.c:41:
   drivers/net/usb/cdc_ncm.c: In function 'cdc_ncm_ndp32':
>> include/uapi/linux/byteorder/big_endian.h:33:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
                             ^
   include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
    #define cpu_to_le32 __cpu_to_le32
                        ^~~~~~~~~~~~~
>> drivers/net/usb/cdc_ncm.c:1175:19: note: in expansion of macro 'cpu_to_le32'
     ndp32->wLength = cpu_to_le32(sizeof(struct usb_cdc_ncm_ndp32) + sizeof(struct usb_cdc_ncm_dpe32));
                      ^~~~~~~~~~~
--
   In file included from include/linux/byteorder/big_endian.h:5:0,
                    from arch/parisc/include/uapi/asm/byteorder.h:5,
                    from arch/parisc/include/asm/bitops.h:11,
                    from include/linux/bitops.h:29,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from drivers/net//usb/cdc_ncm.c:41:
   drivers/net//usb/cdc_ncm.c: In function 'cdc_ncm_ndp32':
>> include/uapi/linux/byteorder/big_endian.h:33:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
                             ^
   include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
    #define cpu_to_le32 __cpu_to_le32
                        ^~~~~~~~~~~~~
   drivers/net//usb/cdc_ncm.c:1175:19: note: in expansion of macro 'cpu_to_le32'
     ndp32->wLength = cpu_to_le32(sizeof(struct usb_cdc_ncm_ndp32) + sizeof(struct usb_cdc_ncm_dpe32));
                      ^~~~~~~~~~~

vim +/cpu_to_le32 +1175 drivers/net/usb/cdc_ncm.c

  1123	
  1124	static struct usb_cdc_ncm_ndp32 *cdc_ncm_ndp32(struct cdc_ncm_ctx *ctx, struct sk_buff *skb, __le32 sign, size_t reserve)
  1125	{
  1126		struct usb_cdc_ncm_ndp32 *ndp32 = NULL;
  1127		struct usb_cdc_ncm_nth32 *nth32 = (void *)skb->data;
  1128		size_t ndpoffset = le32_to_cpu(nth32->dwNdpIndex);
  1129	
  1130		/* If NDP should be moved to the end of the NCM package, we can't follow the
  1131		 * NTH32 header as we would normally do. NDP isn't written to the SKB yet, and
  1132		 * the wNdpIndex field in the header is actually not consistent with reality. It will be later.
  1133		 */
  1134		if (ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END) {
  1135			if (ctx->delayed_ndp32->dwSignature == sign)
  1136				return ctx->delayed_ndp32;
  1137	
  1138			/* We can only push a single NDP to the end. Return
  1139			 * NULL to send what we've already got and queue this
  1140			 * skb for later.
  1141			 */
  1142			else if (ctx->delayed_ndp32->dwSignature)
  1143				return NULL;
  1144		}
  1145	
  1146		/* follow the chain of NDPs, looking for a match */
  1147		while (ndpoffset) {
  1148			ndp32 = (struct usb_cdc_ncm_ndp32 *)(skb->data + ndpoffset);
  1149			if  (ndp32->dwSignature == sign)
  1150				return ndp32;
  1151			ndpoffset = le32_to_cpu(ndp32->dwNextNdpIndex);
  1152		}
  1153	
  1154		/* align new NDP */
  1155		if (!(ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END))
  1156			cdc_ncm_align_tail(skb, ctx->tx_ndp_modulus, 0, ctx->tx_curr_size);
  1157	
  1158		/* verify that there is room for the NDP and the datagram (reserve) */
  1159		if ((ctx->tx_curr_size - skb->len - reserve) < ctx->max_ndp_size)
  1160			return NULL;
  1161	
  1162		/* link to it */
  1163		if (ndp32)
  1164			ndp32->dwNextNdpIndex = cpu_to_le32(skb->len);
  1165		else
  1166			nth32->dwNdpIndex = cpu_to_le32(skb->len);
  1167	
  1168		/* push a new empty NDP */
  1169		if (!(ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END))
  1170			ndp32 = skb_put_zero(skb, ctx->max_ndp_size);
  1171		else
  1172			ndp32 = ctx->delayed_ndp32;
  1173	
  1174		ndp32->dwSignature = sign;
> 1175		ndp32->wLength = cpu_to_le32(sizeof(struct usb_cdc_ncm_ndp32) + sizeof(struct usb_cdc_ncm_dpe32));
  1176		return ndp32;
  1177	}
  1178	

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

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

  reply	other threads:[~2020-03-06  1:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 20:33 [PATCH] cdc_ncm: Implement the 32-bit version of NCM Transfer Block Alexander Bersenev
2020-03-06  1:36 ` kbuild test robot [this message]
2020-03-09  1:31 ` kbuild test robot
2020-03-09  5:04 ` David Miller
2020-03-09 10:17 ` Oliver Neukum
     [not found]   ` <CAPomEdycThBH5D3Eo3dNCPRrEg0W2fQ9JS9j6TbANTDVChVcog@mail.gmail.com>
2020-03-10 14:17     ` Fwd: " Александр Берсенев
2020-03-10 14:24     ` Александр Берсенев
2020-03-10  8:37 ` kbuild test robot
2020-03-12  5:59 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202003060913.E4MPe30b%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.