linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	wg@grandegger.com, mkl@pengutronix.de, robh+dt@kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	kernel@martin.sperl.org, linux-can@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: Re: [RESEND PATCH 2/6] can: mcp25xxfd: Add Microchip MCP25XXFD CAN-FD driver infrastructure
Date: Wed, 10 Jun 2020 22:32:04 +0800	[thread overview]
Message-ID: <202006102212.WrCHpbob%lkp@intel.com> (raw)
In-Reply-To: <20200610074711.10969-3-manivannan.sadhasivam@linaro.org>

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

Hi Manivannan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v5.7 next-20200610]
[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/Manivannan-Sadhasivam/Add-Microchip-MCP25XXFD-CAN-driver/20200610-155045
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

>> drivers/net/can/spi/mcp25xxfd/mcp25xxfd_base.c:69:11: warning: cast to smaller integer type 'enum mcp25xxfd_model' from 'const void *' [-Wvoid-pointer-to-enum-cast]
model = (enum mcp25xxfd_model)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

vim +69 drivers/net/can/spi/mcp25xxfd/mcp25xxfd_base.c

    38	
    39	static int mcp25xxfd_base_probe(struct spi_device *spi)
    40	{
    41		const struct of_device_id *of_id =
    42			of_match_device(mcp25xxfd_of_match, &spi->dev);
    43		struct mcp25xxfd_priv *priv;
    44		struct clk *clk;
    45		enum mcp25xxfd_model model;
    46		u32 freq;
    47		int ret;
    48	
    49		/* Check whether valid IRQ line is defined or not */
    50		if (spi->irq <= 0) {
    51			dev_err(&spi->dev, "no valid irq line defined: irq = %i\n",
    52				spi->irq);
    53			return -EINVAL;
    54		}
    55	
    56		priv = devm_kzalloc(&spi->dev, sizeof(*priv), GFP_KERNEL);
    57		if (!priv)
    58			return -ENOMEM;
    59	
    60		spi_set_drvdata(spi, priv);
    61		priv->spi = spi;
    62	
    63		/* Assign device name */
    64		snprintf(priv->device_name, sizeof(priv->device_name),
    65			 DEVICE_NAME "-%s", dev_name(&priv->spi->dev));
    66	
    67		/* assign model from of or driver_data */
    68		if (of_id)
  > 69			model = (enum mcp25xxfd_model)of_id->data;
    70		else
    71			model = spi_get_device_id(spi)->driver_data;
    72	
    73		clk = devm_clk_get(&spi->dev, NULL);
    74		if (IS_ERR(clk)) {
    75			ret = PTR_ERR(clk);
    76			goto out_free;
    77		}
    78	
    79		freq = clk_get_rate(clk);
    80		if (!(freq == CLOCK_4_MHZ || freq == CLOCK_10_MHZ ||
    81		      freq == CLOCK_40_MHZ)) {
    82			ret = -ERANGE;
    83			goto out_free;
    84		}
    85	
    86		ret = clk_prepare_enable(clk);
    87		if (ret)
    88			goto out_free;
    89	
    90		priv->clk = clk;
    91		priv->clock_freq = freq;
    92	
    93		/* Configure the SPI bus */
    94		spi->bits_per_word = 8;
    95	
    96		/* The frequency of SCK has to be less than or equal to half the
    97		 * frequency of SYSCLK.
    98		 */
    99		spi->max_speed_hz = freq / 2;
   100		ret = spi_setup(spi);
   101		if (ret)
   102			goto out_clk;
   103	
   104		priv->power = devm_regulator_get(&spi->dev, "vdd");
   105		if (IS_ERR(priv->power)) {
   106			if (PTR_ERR(priv->power) != -EPROBE_DEFER)
   107				dev_err(&spi->dev, "failed to get vdd\n");
   108			ret = PTR_ERR(priv->power);
   109			goto out_clk;
   110		}
   111	
   112		ret = mcp25xxfd_base_power_enable(priv->power, 1);
   113		if (ret)
   114			goto out_clk;
   115	
   116		/* disable interrupts */
   117		ret = mcp25xxfd_int_enable(priv, false);
   118		if (ret)
   119			goto out_power;
   120	
   121		/* setup ECC for SRAM */
   122		ret = mcp25xxfd_ecc_enable(priv);
   123		if (ret)
   124			goto out_power;
   125	
   126		dev_info(&spi->dev,
   127			 "MCP%04x successfully initialized.\n", model);
   128		return 0;
   129	
   130	out_power:
   131		mcp25xxfd_base_power_enable(priv->power, 0);
   132	out_clk:
   133		clk_disable_unprepare(clk);
   134	out_free:
   135		dev_err(&spi->dev, "Probe failed, err=%d\n", -ret);
   136		return ret;
   137	}
   138	

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

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

  reply	other threads:[~2020-06-10 14:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10  7:47 [RESEND PATCH 0/6] Add Microchip MCP25XXFD CAN driver Manivannan Sadhasivam
2020-06-10  7:47 ` [RESEND PATCH 1/6] dt-bindings: can: Document devicetree bindings for MCP25XXFD Manivannan Sadhasivam
2020-06-17 22:16   ` Rob Herring
2020-06-10  7:47 ` [RESEND PATCH 2/6] can: mcp25xxfd: Add Microchip MCP25XXFD CAN-FD driver infrastructure Manivannan Sadhasivam
2020-06-10 14:32   ` kernel test robot [this message]
2020-06-10  7:47 ` [RESEND PATCH 3/6] can: mcp25xxfd: Add support for CAN reception Manivannan Sadhasivam
2020-06-10  7:47 ` [RESEND PATCH 4/6] can: mcp25xxfd: Add CAN transmission support Manivannan Sadhasivam
2020-06-10  7:47 ` [RESEND PATCH 5/6] can: mcp25xxfd: Optimize TEF read by avoiding unnecessary SPI transfers Manivannan Sadhasivam
2020-06-10  7:47 ` [RESEND PATCH 6/6] MAINTAINERS: Add entry for Microchip MCP25XXFD CAN network driver Manivannan Sadhasivam

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=202006102212.WrCHpbob%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel@martin.sperl.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=wg@grandegger.com \
    /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).