linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Elder <elder@linaro.org>
To: kernel test robot <lkp@intel.com>, davem@davemloft.net, kuba@kernel.org
Cc: kbuild-all@lists.01.org, evgreen@chromium.org,
	subashab@codeaurora.org, cpratapa@codeaurora.org,
	bjorn.andersson@linaro.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 1/5] net: ipa: program metadata mask differently
Date: Thu, 11 Jun 2020 14:18:59 -0500	[thread overview]
Message-ID: <c864cbed-39ff-3877-03a9-b51630fc2682@linaro.org> (raw)
In-Reply-To: <202006110832.hKzHUsMH%lkp@intel.com>

On 6/10/20 7:19 PM, kernel test robot wrote:
> Hi Alex,
> 
> I love your patch! Perhaps something to improve:

Thanks kernel test robot!

Somehow the "static" specifier got dropped in my patch.

I will fix this when I post version 2, shortly.

					-Alex

> [auto build test WARNING on net/master]
> 
> url:    https://github.com/0day-ci/linux/commits/Alex-Elder/net-ipa-endpoint-configuration-fixes/20200611-035600
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 89dc68533b190117e1a2fb4298d88b96b3580abf
> config: arm64-allyesconfig (attached as .config)
> compiler: aarch64-linux-gcc (GCC) 9.3.0
> 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
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 
> 
> 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 >>, old ones prefixed by <<):
> 
> <<                  from drivers/net/ipa/ipa_endpoint.c:8:
>>> drivers/net/ipa/ipa_endpoint.c:457:6: warning: no previous prototype for 'ipa_endpoint_init_hdr' [-Wmissing-prototypes]
> 457 | void ipa_endpoint_init_hdr(struct ipa_endpoint *endpoint)
> |      ^~~~~~~~~~~~~~~~~~~~~
> In file included from include/linux/bits.h:23,
> from include/linux/bitops.h:5,
> from include/linux/kernel.h:12,
> from include/linux/list.h:9,
> from include/linux/rculist.h:10,
> from include/linux/pid.h:5,
> from include/linux/sched.h:14,
> from include/linux/ratelimit.h:6,
> from include/linux/dev_printk.h:16,
> from include/linux/device.h:15,
> from drivers/net/ipa/ipa_endpoint.c:8:
> drivers/net/ipa/ipa_endpoint.c: In function 'ipa_endpoint_config':
> include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
> 26 |   __builtin_constant_p((l) > (h)), (l) > (h), 0)))
> |                            ^
> include/linux/build_bug.h:16:62: notkke: in definition of macro 'BUILD_BUG_ON_ZERO'
> 16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
> |                                                              ^
> include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
> 39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
> |   ^~~~~~~~~~~~~~~~~~~
> drivers/net/ipa/ipa_endpoint.c:1546:12: note: in expansion of macro 'GENMASK'
> 1546 |  tx_mask = GENMASK(max - 1, 0);
> |            ^~~~~~~
> include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
> 26 |   __builtin_constant_p((l) > (h)), (l) > (h), 0)))
> |                                        ^
> include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
> 16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
> |                                                              ^
> include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
> 39 |  (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
> |   ^~~~~~~~~~~~~~~~~~~
> drivers/net/ipa/ipa_endpoint.c:1546:12: note: in expansion of macro 'GENMASK'
> 1546 |  tx_mask = GENMASK(max - 1, 0);
> |            ^~~~~~~
> 
> vim +/ipa_endpoint_init_hdr +457 drivers/net/ipa/ipa_endpoint.c
> 
>    438	
>    439	/**
>    440	 * We program QMAP endpoints so each packet received is preceded by a QMAP
>    441	 * header structure.  The QMAP header contains a 1-byte mux_id and 2-byte
>    442	 * packet size field, and we have the IPA hardware populate both for each
>    443	 * received packet.  The header is configured (in the HDR_EXT register)
>    444	 * to use big endian format.
>    445	 *
>    446	 * The packet size is written into the QMAP header's pkt_len field.  That
>    447	 * location is defined here using the HDR_OFST_PKT_SIZE field.
>    448	 *
>    449	 * The mux_id comes from a 4-byte metadata value supplied with each packet
>    450	 * by the modem.  It is *not* a QMAP header, but it does contain the mux_id
>    451	 * value that we want, in its low-order byte.  A bitmask defined in the
>    452	 * endpoint's METADATA_MASK register defines which byte within the modem
>    453	 * metadata contains the mux_id.  And the OFST_METADATA field programmed
>    454	 * here indicates where the extracted byte should be placed within the QMAP
>    455	 * header.
>    456	 */
>  > 457	void ipa_endpoint_init_hdr(struct ipa_endpoint *endpoint)
>    458	{
>    459		u32 offset = IPA_REG_ENDP_INIT_HDR_N_OFFSET(endpoint->endpoint_id);
>    460		u32 val = 0;
>    461	
>    462		if (endpoint->data->qmap) {
>    463			size_t header_size = sizeof(struct rmnet_map_header);
>    464	
>    465			/* We might supply a checksum header after the QMAP header */
>    466			if (endpoint->toward_ipa && endpoint->data->checksum)
>    467				header_size += sizeof(struct rmnet_map_ul_csum_header);
>    468			val |= u32_encode_bits(header_size, HDR_LEN_FMASK);
>    469	
>    470			/* Define how to fill mux_id in a received QMAP header */
>    471			if (!endpoint->toward_ipa) {
>    472				u32 off;	/* Field offset within header */
>    473	
>    474				/* Where IPA will write the metadata value */
>    475				off = offsetof(struct rmnet_map_header, mux_id);
>    476				val |= u32_encode_bits(off, HDR_OFST_METADATA_FMASK);
>    477	
>    478				/* Where IPA will write the length */
>    479				off = offsetof(struct rmnet_map_header, pkt_len);
>    480				val |= HDR_OFST_PKT_SIZE_VALID_FMASK;
>    481				val |= u32_encode_bits(off, HDR_OFST_PKT_SIZE_FMASK);
>    482			}
>    483			/* For QMAP TX, metadata offset is 0 (modem assumes this) */
>    484			val |= HDR_OFST_METADATA_VALID_FMASK;
>    485	
>    486			/* HDR_ADDITIONAL_CONST_LEN is 0; (RX only) */
>    487			/* HDR_A5_MUX is 0 */
>    488			/* HDR_LEN_INC_DEAGG_HDR is 0 */
>    489			/* HDR_METADATA_REG_VALID is 0 (TX only) */
>    490		}
>    491	
>    492		iowrite32(val, endpoint->ipa->reg_virt + offset);
>    493	}
>    494	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> 


  parent reply	other threads:[~2020-06-11 19:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 19:53 [PATCH net 0/5] net: ipa: endpoint configuration fixes Alex Elder
2020-06-10 19:53 ` [PATCH net 1/5] net: ipa: program metadata mask differently Alex Elder
     [not found]   ` <202006110832.hKzHUsMH%lkp@intel.com>
2020-06-11 19:18     ` Alex Elder [this message]
2020-06-10 19:53 ` [PATCH net 2/5] net: ipa: fix modem LAN RX endpoint id Alex Elder
2020-06-10 19:53 ` [PATCH net 3/5] net: ipa: program upper nibbles of sequencer type Alex Elder
2020-06-10 19:53 ` [PATCH net 4/5] net: ipa: header pad field only valid for AP->modem endpoint Alex Elder
2020-06-10 19:53 ` [PATCH net 5/5] net: ipa: warn if gsi_trans structure is too big Alex Elder
2020-06-10 23:36   ` David Miller
2020-06-11 12:58     ` Alex Elder

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=c864cbed-39ff-3877-03a9-b51630fc2682@linaro.org \
    --to=elder@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=cpratapa@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=evgreen@chromium.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=subashab@codeaurora.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 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).