All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mauri Sandberg <sandberg@mailfence.com>, linux-gpio@vger.kernel.org
Cc: kbuild-all@lists.01.org, Mauri Sandberg <sandberg@mailfence.com>
Subject: Re: [PATCH] gpio: driver for the NXP 74HC153 chip
Date: Wed, 24 Feb 2021 07:47:20 +0800	[thread overview]
Message-ID: <202102240757.SWtP3M0P-lkp@intel.com> (raw)
In-Reply-To: <20210223195326.1355245-2-sandberg@mailfence.com>

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

Hi Mauri,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on gpio/for-next]
[also build test ERROR on v5.11 next-20210223]
[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/Mauri-Sandberg/gpio-driver-for-the-NXP-74HC153-chip/20210224-040026
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: s390-allmodconfig (attached as .config)
compiler: s390-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
        # https://github.com/0day-ci/linux/commit/04cf14b1b4dad0702e35202513962925fdf8113f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mauri-Sandberg/gpio-driver-for-the-NXP-74HC153-chip/20210224-040026
        git checkout 04cf14b1b4dad0702e35202513962925fdf8113f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 >>):

   drivers/gpio/gpio-nxp-74hc153.c: In function 'nxp_74hc153_get_value':
   drivers/gpio/gpio-nxp-74hc153.c:75:36: warning: variable 'pdata' set but not used [-Wunused-but-set-variable]
      75 |  struct nxp_74hc153_platform_data *pdata;
         |                                    ^~~~~
   drivers/gpio/gpio-nxp-74hc153.c: In function 'nxp_74hc153_probe':
>> drivers/gpio/gpio-nxp-74hc153.c:216:4: error: 'struct gpio_chip' has no member named 'of_node'
     216 |  gc->of_node = np;
         |    ^~


vim +216 drivers/gpio/gpio-nxp-74hc153.c

   103	
   104	static int nxp_74hc153_probe(struct platform_device *pdev)
   105	{
   106		struct device_node *np = pdev->dev.of_node;
   107		struct nxp_74hc153_chip *nxp;
   108		struct gpio_chip *gc;
   109		int err;
   110		unsigned gpio_s0;
   111		unsigned gpio_s1;
   112		unsigned gpio_1y;
   113	        unsigned gpio_2y;
   114	
   115		nxp = kzalloc(sizeof(struct nxp_74hc153_chip), GFP_KERNEL);
   116		if (nxp == NULL) {
   117			dev_err(&pdev->dev, "no memory for private data\n");
   118			return -ENOMEM;
   119		}
   120	
   121		gpio_s0 = of_get_named_gpio(np, "gpio-s0", 0);
   122		gpio_s1 = of_get_named_gpio(np, "gpio-s1", 0);
   123		gpio_1y = of_get_named_gpio(np, "gpio-1y", 0);
   124		gpio_2y = of_get_named_gpio(np, "gpio-2y", 0);
   125	
   126		if (!gpio_is_valid(gpio_s0) || !gpio_is_valid(gpio_s1) ||
   127	  	    !gpio_is_valid(gpio_1y) || !gpio_is_valid(gpio_2y)) {
   128	
   129			dev_err(&pdev->dev, "control GPIO(s) are missing\n");
   130			err = -EINVAL;
   131			goto err_free_nxp;
   132		} else {
   133			nxp->config.gpio_pin_s0 = gpio_s0;
   134			nxp->config.gpio_pin_s1 = gpio_s1;
   135			nxp->config.gpio_pin_1y = gpio_1y;
   136			nxp->config.gpio_pin_2y = gpio_2y;
   137		}
   138	
   139		// apply pin configuration
   140		err = gpio_request(nxp->config.gpio_pin_s0, dev_name(&pdev->dev));
   141		if (err) {
   142			dev_err(&pdev->dev, "unable to claim gpio %u, err=%d\n",
   143				nxp->config.gpio_pin_s0, err);
   144			goto err_free_nxp;
   145		}
   146	
   147		err = gpio_request(nxp->config.gpio_pin_s1, dev_name(&pdev->dev));
   148		if (err) {
   149			dev_err(&pdev->dev, "unable to claim gpio %u, err=%d\n",
   150				nxp->config.gpio_pin_s1, err);
   151			goto err_free_s0;
   152		}
   153	
   154		err = gpio_request(nxp->config.gpio_pin_1y, dev_name(&pdev->dev));
   155		if (err) {
   156			dev_err(&pdev->dev, "unable to claim gpio %u, err=%d\n",
   157				nxp->config.gpio_pin_1y, err);
   158			goto err_free_s1;
   159		}
   160	
   161		err = gpio_request(nxp->config.gpio_pin_2y, dev_name(&pdev->dev));
   162		if (err) {
   163			dev_err(&pdev->dev, "unable to claim gpio %u, err=%d\n",
   164				nxp->config.gpio_pin_2y, err);
   165			goto err_free_1y;
   166		}
   167	
   168		err = gpio_direction_output(nxp->config.gpio_pin_s0, 0);
   169		if (err) {
   170			dev_err(&pdev->dev,
   171				"unable to set direction of gpio %u, err=%d\n",
   172				nxp->config.gpio_pin_s0, err);
   173			goto err_free_2y;
   174		}
   175	
   176		err = gpio_direction_output(nxp->config.gpio_pin_s1, 0);
   177		if (err) {
   178			dev_err(&pdev->dev,
   179				"unable to set direction of gpio %u, err=%d\n",
   180				nxp->config.gpio_pin_s1, err);
   181			goto err_free_2y;
   182		}
   183	
   184		err = gpio_direction_input(nxp->config.gpio_pin_1y);
   185		if (err) {
   186			dev_err(&pdev->dev,
   187				"unable to set direction of gpio %u, err=%d\n",
   188				nxp->config.gpio_pin_1y, err);
   189			goto err_free_2y;
   190		}
   191	
   192		err = gpio_direction_input(nxp->config.gpio_pin_2y);
   193		if (err) {
   194			dev_err(&pdev->dev,
   195				"unable to set direction of gpio %u, err=%d\n",
   196				nxp->config.gpio_pin_2y, err);
   197			goto err_free_2y;
   198		}
   199	
   200		nxp->parent = &pdev->dev;
   201		mutex_init(&nxp->lock);
   202	
   203		gc = &nxp->gpio_chip;
   204	
   205		gc->direction_input  = nxp_74hc153_direction_input;
   206		gc->direction_output = nxp_74hc153_direction_output;
   207		gc->get = nxp_74hc153_get_value;
   208		gc->set = nxp_74hc153_set_value;
   209		gc->can_sleep = 1;
   210	
   211		gc->base = -1;
   212		gc->ngpio = NXP_74HC153_NUM_GPIOS;
   213		gc->label = dev_name(nxp->parent);
   214		gc->parent = nxp->parent;
   215		gc->owner = THIS_MODULE;
 > 216		gc->of_node = np;
   217	
   218		err = gpiochip_add(&nxp->gpio_chip);
   219		if (err) {
   220			dev_err(&pdev->dev, "unable to add gpio chip, err=%d\n", err);
   221			goto err_free_2y;
   222		}
   223	
   224		platform_set_drvdata(pdev, nxp);
   225		return 0;
   226	
   227	err_free_2y:
   228		gpio_free(nxp->config.gpio_pin_2y);
   229	err_free_1y:
   230		gpio_free(nxp->config.gpio_pin_1y);
   231	err_free_s1:
   232		gpio_free(nxp->config.gpio_pin_s1);
   233	err_free_s0:
   234		gpio_free(nxp->config.gpio_pin_s0);
   235	err_free_nxp:
   236		kfree(nxp);
   237		return err;
   238	}
   239	

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] gpio: driver for the NXP 74HC153 chip
Date: Wed, 24 Feb 2021 07:47:20 +0800	[thread overview]
Message-ID: <202102240757.SWtP3M0P-lkp@intel.com> (raw)
In-Reply-To: <20210223195326.1355245-2-sandberg@mailfence.com>

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

Hi Mauri,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on gpio/for-next]
[also build test ERROR on v5.11 next-20210223]
[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/Mauri-Sandberg/gpio-driver-for-the-NXP-74HC153-chip/20210224-040026
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: s390-allmodconfig (attached as .config)
compiler: s390-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
        # https://github.com/0day-ci/linux/commit/04cf14b1b4dad0702e35202513962925fdf8113f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mauri-Sandberg/gpio-driver-for-the-NXP-74HC153-chip/20210224-040026
        git checkout 04cf14b1b4dad0702e35202513962925fdf8113f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 >>):

   drivers/gpio/gpio-nxp-74hc153.c: In function 'nxp_74hc153_get_value':
   drivers/gpio/gpio-nxp-74hc153.c:75:36: warning: variable 'pdata' set but not used [-Wunused-but-set-variable]
      75 |  struct nxp_74hc153_platform_data *pdata;
         |                                    ^~~~~
   drivers/gpio/gpio-nxp-74hc153.c: In function 'nxp_74hc153_probe':
>> drivers/gpio/gpio-nxp-74hc153.c:216:4: error: 'struct gpio_chip' has no member named 'of_node'
     216 |  gc->of_node = np;
         |    ^~


vim +216 drivers/gpio/gpio-nxp-74hc153.c

   103	
   104	static int nxp_74hc153_probe(struct platform_device *pdev)
   105	{
   106		struct device_node *np = pdev->dev.of_node;
   107		struct nxp_74hc153_chip *nxp;
   108		struct gpio_chip *gc;
   109		int err;
   110		unsigned gpio_s0;
   111		unsigned gpio_s1;
   112		unsigned gpio_1y;
   113	        unsigned gpio_2y;
   114	
   115		nxp = kzalloc(sizeof(struct nxp_74hc153_chip), GFP_KERNEL);
   116		if (nxp == NULL) {
   117			dev_err(&pdev->dev, "no memory for private data\n");
   118			return -ENOMEM;
   119		}
   120	
   121		gpio_s0 = of_get_named_gpio(np, "gpio-s0", 0);
   122		gpio_s1 = of_get_named_gpio(np, "gpio-s1", 0);
   123		gpio_1y = of_get_named_gpio(np, "gpio-1y", 0);
   124		gpio_2y = of_get_named_gpio(np, "gpio-2y", 0);
   125	
   126		if (!gpio_is_valid(gpio_s0) || !gpio_is_valid(gpio_s1) ||
   127	  	    !gpio_is_valid(gpio_1y) || !gpio_is_valid(gpio_2y)) {
   128	
   129			dev_err(&pdev->dev, "control GPIO(s) are missing\n");
   130			err = -EINVAL;
   131			goto err_free_nxp;
   132		} else {
   133			nxp->config.gpio_pin_s0 = gpio_s0;
   134			nxp->config.gpio_pin_s1 = gpio_s1;
   135			nxp->config.gpio_pin_1y = gpio_1y;
   136			nxp->config.gpio_pin_2y = gpio_2y;
   137		}
   138	
   139		// apply pin configuration
   140		err = gpio_request(nxp->config.gpio_pin_s0, dev_name(&pdev->dev));
   141		if (err) {
   142			dev_err(&pdev->dev, "unable to claim gpio %u, err=%d\n",
   143				nxp->config.gpio_pin_s0, err);
   144			goto err_free_nxp;
   145		}
   146	
   147		err = gpio_request(nxp->config.gpio_pin_s1, dev_name(&pdev->dev));
   148		if (err) {
   149			dev_err(&pdev->dev, "unable to claim gpio %u, err=%d\n",
   150				nxp->config.gpio_pin_s1, err);
   151			goto err_free_s0;
   152		}
   153	
   154		err = gpio_request(nxp->config.gpio_pin_1y, dev_name(&pdev->dev));
   155		if (err) {
   156			dev_err(&pdev->dev, "unable to claim gpio %u, err=%d\n",
   157				nxp->config.gpio_pin_1y, err);
   158			goto err_free_s1;
   159		}
   160	
   161		err = gpio_request(nxp->config.gpio_pin_2y, dev_name(&pdev->dev));
   162		if (err) {
   163			dev_err(&pdev->dev, "unable to claim gpio %u, err=%d\n",
   164				nxp->config.gpio_pin_2y, err);
   165			goto err_free_1y;
   166		}
   167	
   168		err = gpio_direction_output(nxp->config.gpio_pin_s0, 0);
   169		if (err) {
   170			dev_err(&pdev->dev,
   171				"unable to set direction of gpio %u, err=%d\n",
   172				nxp->config.gpio_pin_s0, err);
   173			goto err_free_2y;
   174		}
   175	
   176		err = gpio_direction_output(nxp->config.gpio_pin_s1, 0);
   177		if (err) {
   178			dev_err(&pdev->dev,
   179				"unable to set direction of gpio %u, err=%d\n",
   180				nxp->config.gpio_pin_s1, err);
   181			goto err_free_2y;
   182		}
   183	
   184		err = gpio_direction_input(nxp->config.gpio_pin_1y);
   185		if (err) {
   186			dev_err(&pdev->dev,
   187				"unable to set direction of gpio %u, err=%d\n",
   188				nxp->config.gpio_pin_1y, err);
   189			goto err_free_2y;
   190		}
   191	
   192		err = gpio_direction_input(nxp->config.gpio_pin_2y);
   193		if (err) {
   194			dev_err(&pdev->dev,
   195				"unable to set direction of gpio %u, err=%d\n",
   196				nxp->config.gpio_pin_2y, err);
   197			goto err_free_2y;
   198		}
   199	
   200		nxp->parent = &pdev->dev;
   201		mutex_init(&nxp->lock);
   202	
   203		gc = &nxp->gpio_chip;
   204	
   205		gc->direction_input  = nxp_74hc153_direction_input;
   206		gc->direction_output = nxp_74hc153_direction_output;
   207		gc->get = nxp_74hc153_get_value;
   208		gc->set = nxp_74hc153_set_value;
   209		gc->can_sleep = 1;
   210	
   211		gc->base = -1;
   212		gc->ngpio = NXP_74HC153_NUM_GPIOS;
   213		gc->label = dev_name(nxp->parent);
   214		gc->parent = nxp->parent;
   215		gc->owner = THIS_MODULE;
 > 216		gc->of_node = np;
   217	
   218		err = gpiochip_add(&nxp->gpio_chip);
   219		if (err) {
   220			dev_err(&pdev->dev, "unable to add gpio chip, err=%d\n", err);
   221			goto err_free_2y;
   222		}
   223	
   224		platform_set_drvdata(pdev, nxp);
   225		return 0;
   226	
   227	err_free_2y:
   228		gpio_free(nxp->config.gpio_pin_2y);
   229	err_free_1y:
   230		gpio_free(nxp->config.gpio_pin_1y);
   231	err_free_s1:
   232		gpio_free(nxp->config.gpio_pin_s1);
   233	err_free_s0:
   234		gpio_free(nxp->config.gpio_pin_s0);
   235	err_free_nxp:
   236		kfree(nxp);
   237		return err;
   238	}
   239	

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

  parent reply	other threads:[~2021-02-24  0:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 19:53 [RFC] Driver for the NXP 74HC153 chip Mauri Sandberg
2021-02-23 19:53 ` [PATCH] gpio: driver " Mauri Sandberg
2021-02-23 23:22   ` kernel test robot
2021-02-23 23:22     ` kernel test robot
2021-04-03  9:39     ` Andy Shevchenko
2021-04-03  9:39       ` Andy Shevchenko
2021-02-23 23:47   ` kernel test robot [this message]
2021-02-23 23:47     ` kernel test robot
2021-04-02 20:27   ` Drew Fustini
2021-04-04 14:30     ` Mauri Sandberg
2021-04-04 15:35       ` Drew Fustini
2021-04-04 17:17         ` Andy Shevchenko
2021-04-05  8:25           ` Mauri Sandberg
2021-04-05  9:11             ` Andy Shevchenko

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=202102240757.SWtP3M0P-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=sandberg@mailfence.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 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.