linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: kbuild-all@01.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/7] usb: mtu3: support ip-sleep wakeup for MT8183
Date: Mon, 2 Sep 2019 17:23:59 +0800	[thread overview]
Message-ID: <201909021608.lzgSfBtG%lkp@intel.com> (raw)
In-Reply-To: <1567150854-30033-4-git-send-email-chunfeng.yun@mediatek.com>

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

Hi Chunfeng,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[cannot apply to v5.3-rc6 next-20190830]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chunfeng-Yun/add-support-USB-for-MT8183/20190901-163637
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.4.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.4.0 make.cross ARCH=ia64 

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/bitops.h:5:0,
                    from include/linux/kernel.h:12,
                    from include/linux/clk.h:13,
                    from drivers//usb/mtu3/mtu3_host.c:10:
   drivers//usb/mtu3/mtu3_host.c: In function 'ssusb_wakeup_ip_sleep_set':
>> include/linux/bits.h:8:19: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define BIT(nr)   (UL(1) << (nr))
                      ^
>> drivers//usb/mtu3/mtu3_host.c:25:19: note: in expansion of macro 'BIT'
    #define WC0_IS_EN BIT(6)
                      ^~~
>> drivers//usb/mtu3/mtu3_host.c:55:9: note: in expansion of macro 'WC0_IS_EN'
      msk = WC0_IS_EN | WC0_IS_C(0xf) | WC0_IS_P;
            ^~~~~~~~~
--
   In file included from include/linux/bitops.h:5:0,
                    from include/linux/kernel.h:12,
                    from include/linux/clk.h:13,
                    from drivers/usb/mtu3/mtu3_host.c:10:
   drivers/usb/mtu3/mtu3_host.c: In function 'ssusb_wakeup_ip_sleep_set':
>> include/linux/bits.h:8:19: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define BIT(nr)   (UL(1) << (nr))
                      ^
   drivers/usb/mtu3/mtu3_host.c:25:19: note: in expansion of macro 'BIT'
    #define WC0_IS_EN BIT(6)
                      ^~~
   drivers/usb/mtu3/mtu3_host.c:55:9: note: in expansion of macro 'WC0_IS_EN'
      msk = WC0_IS_EN | WC0_IS_C(0xf) | WC0_IS_P;
            ^~~~~~~~~

vim +/WC0_IS_EN +55 drivers//usb/mtu3/mtu3_host.c

  > 10	#include <linux/clk.h>
    11	#include <linux/iopoll.h>
    12	#include <linux/irq.h>
    13	#include <linux/kernel.h>
    14	#include <linux/mfd/syscon.h>
    15	#include <linux/of_device.h>
    16	#include <linux/regmap.h>
    17	
    18	#include "mtu3.h"
    19	#include "mtu3_dr.h"
    20	
    21	/* mt8183 etc */
    22	#define PERI_WK_CTRL0	0x20
    23	#define WC0_IS_C(x)	(((x) & 0xf) << 28)  /* cycle debounce */
    24	#define WC0_IS_P	BIT(12)	/* polarity */
  > 25	#define WC0_IS_EN	BIT(6)
    26	
    27	/* mt8173 etc */
    28	#define PERI_WK_CTRL1	0x4
    29	#define WC1_IS_C(x)	(((x) & 0xf) << 26)  /* cycle debounce */
    30	#define WC1_IS_EN	BIT(25)
    31	#define WC1_IS_P	BIT(6)  /* polarity for ip sleep */
    32	
    33	/* mt2712 etc */
    34	#define PERI_SSUSB_SPM_CTRL	0x0
    35	#define SSC_IP_SLEEP_EN	BIT(4)
    36	#define SSC_SPM_INT_EN		BIT(1)
    37	
    38	enum ssusb_uwk_vers {
    39		SSUSB_UWK_V0 = 0,
    40		SSUSB_UWK_V1,
    41		SSUSB_UWK_V2,
    42	};
    43	
    44	/*
    45	 * ip-sleep wakeup mode:
    46	 * all clocks can be turn off, but power domain should be kept on
    47	 */
    48	static void ssusb_wakeup_ip_sleep_set(struct ssusb_mtk *ssusb, bool enable)
    49	{
    50		u32 reg, msk, val;
    51	
    52		switch (ssusb->uwk_vers) {
    53		case SSUSB_UWK_V0:
    54			reg = ssusb->uwk_reg_base + PERI_WK_CTRL0;
  > 55			msk = WC0_IS_EN | WC0_IS_C(0xf) | WC0_IS_P;
    56			val = enable ? (WC0_IS_EN | WC0_IS_C(0x8)) : 0;
    57			break;
    58		case SSUSB_UWK_V1:
    59			reg = ssusb->uwk_reg_base + PERI_WK_CTRL1;
    60			msk = WC1_IS_EN | WC1_IS_C(0xf) | WC1_IS_P;
    61			val = enable ? (WC1_IS_EN | WC1_IS_C(0x8)) : 0;
    62			break;
    63		case SSUSB_UWK_V2:
    64			reg = ssusb->uwk_reg_base + PERI_SSUSB_SPM_CTRL;
    65			msk = SSC_IP_SLEEP_EN | SSC_SPM_INT_EN;
    66			val = enable ? msk : 0;
    67			break;
    68		default:
    69			return;
    70		}
    71		regmap_update_bits(ssusb->uwk, reg, msk, val);
    72	}
    73	

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

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

  reply	other threads:[~2019-09-02  9:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30  7:40 [PATCH v3 0/7] add support USB for MT8183 Chunfeng Yun
2019-08-30  7:40 ` [PATCH v3 1/7] dt-bindings: usb: mtu3: support USB wakeup " Chunfeng Yun
2019-09-02 13:39   ` Rob Herring
2019-08-30  7:40 ` [PATCH v3 2/7] dt-bindings: usb: mtk-xhci: " Chunfeng Yun
2019-09-02 13:39   ` Rob Herring
2019-08-30  7:40 ` [PATCH v3 3/7] usb: mtu3: support ip-sleep " Chunfeng Yun
2019-09-02  9:23   ` kbuild test robot [this message]
2019-09-11 18:44   ` Guenter Roeck
2019-09-16  5:45     ` Chunfeng Yun
2019-08-30  7:40 ` [PATCH v3 4/7] usb: mtk-xhci: " Chunfeng Yun
2019-09-02 11:58   ` kbuild test robot
2019-08-30  7:40 ` [PATCH v3 5/7] arm64: dts: mt8183: add usb and phy nodes Chunfeng Yun
2019-09-03 11:25   ` kbuild test robot
2020-05-21 15:06   ` Matthias Brugger
2019-08-30  7:40 ` [PATCH v3 6/7] arm64: dts: mt8183: enable USB remote wakeup Chunfeng Yun
2019-08-30  7:40 ` [PATCH v3 7/7] arm64: dts: mt8183: tune disconnect threshold of u2phy Chunfeng Yun
2019-09-04  1:54 ` [PATCH v3 0/7] add support USB for MT8183 Chunfeng Yun
2019-09-04  7:06   ` Greg Kroah-Hartman
2020-05-21 12:41   ` Matthias Brugger
2020-05-22  1:07     ` Chunfeng Yun

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=201909021608.lzgSfBtG%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathias.nyman@intel.com \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.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).