lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211020849.JroXgZZa-lkp@intel.com>
Date:   Wed, 2 Nov 2022 08:35:23 +0800
From:   kernel test robot <lkp@...el.com>
To:     Billy Tsai <billy_tsai@...eedtech.com>, jdelvare@...e.com,
        linux@...ck-us.net, robh+dt@...nel.org, joel@....id.au,
        andrew@...id.au, lee.jones@...aro.org, thierry.reding@...il.com,
        u.kleine-koenig@...gutronix.de, p.zabel@...gutronix.de,
        linux-hwmon@...r.kernel.org, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-aspeed@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
        linux-pwm@...r.kernel.org, BMC-SW@...eedtech.com,
        garnermic@...a.com
Cc:     oe-kbuild-all@...ts.linux.dev
Subject: Re: [PATCH 3/3] hwmon: Add Aspeed ast2600 TACH support

Hi Billy,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on groeck-staging/hwmon-next]
[also build test WARNING on thierry-reding-pwm/for-next lee-mfd/for-mfd-next robh/for-next linus/master v6.1-rc3 next-20221101]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Billy-Tsai/Support-pwm-tach-driver-for-aspeed-ast26xx/20221031-183813
base:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
patch link:    https://lore.kernel.org/r/20221031103809.20225-4-billy_tsai%40aspeedtech.com
patch subject: [PATCH 3/3] hwmon: Add Aspeed ast2600 TACH support
config: sparc-randconfig-s052-20221101
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/34cbef9d62b8b6b352437c2ccaa6467de6524889
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Billy-Tsai/Support-pwm-tach-driver-for-aspeed-ast26xx/20221031-183813
        git checkout 34cbef9d62b8b6b352437c2ccaa6467de6524889
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash drivers/hwmon/ drivers/media/i2c/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
>> drivers/hwmon/tach-aspeed-ast2600.c:615:52: sparse: sparse: Using plain integer as NULL pointer

vim +615 drivers/hwmon/tach-aspeed-ast2600.c

   585	
   586	static int aspeed_tach_probe(struct platform_device *pdev)
   587	{
   588		struct device *dev = &pdev->dev;
   589		struct device_node *np, *child;
   590		struct aspeed_tach_data *priv;
   591		struct device *hwmon;
   592		struct platform_device *parent_dev;
   593		int ret;
   594	
   595		np = dev->parent->of_node;
   596		if (!of_device_is_compatible(np, "aspeed,ast2600-pwm-tach"))
   597			return dev_err_probe(dev, -ENODEV,
   598					     "Unsupported tach device binding\n");
   599	
   600		priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
   601		if (!priv)
   602			return -ENOMEM;
   603		priv->dev = &pdev->dev;
   604		priv->tach_channel =
   605			devm_kzalloc(dev,
   606				     TACH_ASPEED_NR_TACHS * sizeof(*priv->tach_channel),
   607				     GFP_KERNEL);
   608	
   609		priv->regmap = syscon_node_to_regmap(np);
   610		if (IS_ERR(priv->regmap)) {
   611			dev_err(priv->dev, "Couldn't get regmap\n");
   612			return -ENODEV;
   613		}
   614		parent_dev = of_find_device_by_node(np);
 > 615		priv->clk = devm_clk_get(&parent_dev->dev, 0);
   616		if (IS_ERR(priv->clk))
   617			return dev_err_probe(dev, PTR_ERR(priv->clk),
   618					     "Couldn't get clock\n");
   619	
   620		priv->reset = devm_reset_control_get_shared(&parent_dev->dev, NULL);
   621		if (IS_ERR(priv->reset))
   622			return dev_err_probe(dev, PTR_ERR(priv->reset),
   623					     "Couldn't get reset control\n");
   624	
   625		ret = clk_prepare_enable(priv->clk);
   626		if (ret)
   627			return dev_err_probe(dev, ret, "Couldn't enable clock\n");
   628	
   629		ret = reset_control_deassert(priv->reset);
   630		if (ret) {
   631			dev_err_probe(dev, ret, "Couldn't deassert reset control\n");
   632			goto err_disable_clk;
   633		}
   634		for_each_child_of_node(dev->of_node, child) {
   635			ret = aspeed_tach_create_fan(dev, child, priv);
   636			if (ret) {
   637				of_node_put(child);
   638				goto err_assert_reset;
   639			}
   640		}
   641	
   642		priv->groups[0] = &fan_dev_group;
   643		priv->groups[1] = NULL;
   644		hwmon = devm_hwmon_device_register_with_groups(dev, "aspeed_tach", priv,
   645							       priv->groups);
   646		ret = PTR_ERR_OR_ZERO(hwmon);
   647		if (ret) {
   648			dev_err_probe(dev, ret, "Failed to register hwmon device\n");
   649			goto err_assert_reset;
   650		}
   651		platform_set_drvdata(pdev, priv);
   652		return 0;
   653	err_assert_reset:
   654		reset_control_assert(priv->reset);
   655	err_disable_clk:
   656		clk_disable_unprepare(priv->clk);
   657		return ret;
   658	}
   659	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (189168 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ