All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] mmc: rtsx: Add SD Express mode support for RTS5261
Date: Thu, 24 Sep 2020 18:48:04 +0800	[thread overview]
Message-ID: <202009241809.9XW0wGY0%lkp@intel.com> (raw)
In-Reply-To: <1600933221-3496-1-git-send-email-rui_feng@realsil.com.cn>

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

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on soc/for-next linus/master v5.9-rc6 next-20200923]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/rui_feng-realsil-com-cn/mmc-rtsx-Add-SD-Express-mode-support-for-RTS5261/20200924-154122
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 26ed5146bd17cbcd0fb84e358902ac244728a3f3
config: s390-randconfig-r003-20200923 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project d6ac649ccda289ecc2d2c0cb51892d57e8ec328c)
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 s390 cross compiling tool for clang build
        # apt-get install binutils-s390x-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390 

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

All errors (new ones prefixed by >>):

   include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0x000000ffUL) << 24) |            \
                     ^
   In file included from drivers/mmc/host/rtsx_pci_sdmmc.c:21:
   In file included from include/linux/rtsx_pci.h:14:
   In file included from include/linux/pci.h:39:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:72:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0x0000ff00UL) <<  8) |            \
                     ^
   In file included from drivers/mmc/host/rtsx_pci_sdmmc.c:21:
   In file included from include/linux/rtsx_pci.h:14:
   In file included from include/linux/pci.h:39:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:72:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0x00ff0000UL) >>  8) |            \
                     ^
   In file included from drivers/mmc/host/rtsx_pci_sdmmc.c:21:
   In file included from include/linux/rtsx_pci.h:14:
   In file included from include/linux/pci.h:39:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:72:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0xff000000UL) >> 24)))
                     ^
   In file included from drivers/mmc/host/rtsx_pci_sdmmc.c:21:
   In file included from include/linux/rtsx_pci.h:14:
   In file included from include/linux/pci.h:39:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:72:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
           __fswab32(x))
                     ^
   In file included from drivers/mmc/host/rtsx_pci_sdmmc.c:21:
   In file included from include/linux/rtsx_pci.h:14:
   In file included from include/linux/pci.h:39:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:72:
   include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsb(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsw(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsl(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesb(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesw(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesl(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
>> drivers/mmc/host/rtsx_pci_sdmmc.c:931:20: error: use of undeclared identifier 'MMC_CAP2_SD_EXP'
                           mmc->caps2 &= ~(MMC_CAP2_SD_EXP | MMC_CAP2_SD_EXP_1_2V);
                                           ^
>> drivers/mmc/host/rtsx_pci_sdmmc.c:931:38: error: use of undeclared identifier 'MMC_CAP2_SD_EXP_1_2V'
                           mmc->caps2 &= ~(MMC_CAP2_SD_EXP | MMC_CAP2_SD_EXP_1_2V);
                                                             ^
   drivers/mmc/host/rtsx_pci_sdmmc.c:1141:17: error: use of undeclared identifier 'MMC_CAP2_SD_EXP'
                   mmc->caps2 |= MMC_CAP2_SD_EXP | MMC_CAP2_SD_EXP_1_2V;
                                 ^
   drivers/mmc/host/rtsx_pci_sdmmc.c:1141:35: error: use of undeclared identifier 'MMC_CAP2_SD_EXP_1_2V'
                   mmc->caps2 |= MMC_CAP2_SD_EXP | MMC_CAP2_SD_EXP_1_2V;
                                                   ^
>> drivers/mmc/host/rtsx_pci_sdmmc.c:1376:3: error: field designator 'init_sd_express' does not refer to any field in type 'const struct mmc_host_ops'
           .init_sd_express = sdmmc_init_sd_express,
            ^
   drivers/mmc/host/rtsx_pci_sdmmc.c:1399:17: error: use of undeclared identifier 'MMC_CAP2_SD_EXP'
                   mmc->caps2 |= MMC_CAP2_SD_EXP | MMC_CAP2_SD_EXP_1_2V;
                                 ^
   drivers/mmc/host/rtsx_pci_sdmmc.c:1399:35: error: use of undeclared identifier 'MMC_CAP2_SD_EXP_1_2V'
                   mmc->caps2 |= MMC_CAP2_SD_EXP | MMC_CAP2_SD_EXP_1_2V;
                                                   ^
   20 warnings and 7 errors generated.

# https://github.com/0day-ci/linux/commit/37daa224f78ef228349cee981d690b735fb9bb2b
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review rui_feng-realsil-com-cn/mmc-rtsx-Add-SD-Express-mode-support-for-RTS5261/20200924-154122
git checkout 37daa224f78ef228349cee981d690b735fb9bb2b
vim +/MMC_CAP2_SD_EXP +931 drivers/mmc/host/rtsx_pci_sdmmc.c

   894	
   895	static int sd_power_on(struct realtek_pci_sdmmc *host)
   896	{
   897		struct rtsx_pcr *pcr = host->pcr;
   898		struct mmc_host *mmc = host->mmc;
   899		int err;
   900		u32 val;
   901	
   902		if (host->power_state == SDMMC_POWER_ON)
   903			return 0;
   904	
   905		rtsx_pci_init_cmd(pcr);
   906		rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SELECT, 0x07, SD_MOD_SEL);
   907		rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SHARE_MODE,
   908				CARD_SHARE_MASK, CARD_SHARE_48_SD);
   909		rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_CLK_EN,
   910				SD_CLK_EN, SD_CLK_EN);
   911		err = rtsx_pci_send_cmd(pcr, 100);
   912		if (err < 0)
   913			return err;
   914	
   915		err = rtsx_pci_card_pull_ctl_enable(pcr, RTSX_SD_CARD);
   916		if (err < 0)
   917			return err;
   918	
   919		err = rtsx_pci_card_power_on(pcr, RTSX_SD_CARD);
   920		if (err < 0)
   921			return err;
   922	
   923		err = rtsx_pci_write_register(pcr, CARD_OE, SD_OUTPUT_EN, SD_OUTPUT_EN);
   924		if (err < 0)
   925			return err;
   926	
   927		if (PCI_PID(pcr) == PID_5261) {
   928			val = rtsx_pci_readl(pcr, RTSX_BIPR);
   929			if (val & SD_WRITE_PROTECT) {
   930				pcr->extra_caps &= ~EXTRA_CAPS_SD_EXPRESS;
 > 931				mmc->caps2 &= ~(MMC_CAP2_SD_EXP | MMC_CAP2_SD_EXP_1_2V);
   932			}
   933		}
   934	
   935		host->power_state = SDMMC_POWER_ON;
   936		return 0;
   937	}
   938	

---
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: 29570 bytes --]

  parent reply	other threads:[~2020-09-24 10:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24  7:40 [PATCH] mmc: rtsx: Add SD Express mode support for RTS5261 rui_feng
2020-09-24  9:38 ` kernel test robot
2020-09-24  9:38   ` kernel test robot
2020-09-24  9:48   ` 答复: " 冯锐
2020-09-24 10:01     ` Ulf Hansson
2020-09-24 11:15       ` Ulf Hansson
2020-09-24 10:48 ` kernel test robot [this message]
2020-09-24 20:54 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-04-26  1:25 rui_feng
2020-04-27  6:14 ` Christoph Hellwig
2020-04-27  9:40   ` 答复: " 冯锐
2020-04-27 11:07     ` Arnd Bergmann
2020-04-28  3:44       ` 答复: " 冯锐
2020-05-05 18:18         ` Ulf Hansson
2020-05-19  9:17           ` 答复: " 冯锐
2020-05-25 10:27             ` Ulf Hansson
2020-06-01  7:33               ` 答复: " 冯锐
2020-06-01 10:19                 ` Ulf Hansson
2020-06-02  2:41                   ` 答复: " 冯锐
2020-06-02  8:36                     ` Ulf Hansson
2020-07-01  9:52                       ` 答复: " 冯锐
2020-07-06 14:42                         ` Ulf Hansson
2020-05-05 14:28 ` Greg KH

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=202009241809.9XW0wGY0%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.