From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 19/24] pinctrl: lynxpoint: Reuse struct intel_pinctrl in the driver
Date: Tue, 10 Dec 2019 13:26:02 +0800 [thread overview]
Message-ID: <201912101342.yRdWiUtA%lkp@intel.com> (raw)
In-Reply-To: <20191209130926.86483-20-andriy.shevchenko@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 10964 bytes --]
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on gpio/for-next v5.5-rc1 next-20191209]
[cannot apply to pinctrl/devel]
[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/Andy-Shevchenko/pinctrl-intel-Move-Lynxpoint-to-pin-control-umbrella/20191210-030030
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e42617b825f8073569da76dc4510bfa019b1c35a
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/pinctrl/intel/pinctrl-lynxpoint.c:200:56: warning: 'struct intel_pinctrl' declared inside parameter list will not be visible outside of this definition or declaration
static struct intel_community *lp_get_community(struct intel_pinctrl *lg,
^~~~~~~~~~~~~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_get_community':
>> drivers/pinctrl/intel/pinctrl-lynxpoint.c:206:20: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
for (i = 0; i < lg->ncommunities; i++) {
^~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_gpio_reg':
>> drivers/pinctrl/intel/pinctrl-lynxpoint.c:222:26: error: passing argument 1 of 'lp_get_community' from incompatible pointer type [-Werror=incompatible-pointer-types]
comm = lp_get_community(lg, offset);
^~
drivers/pinctrl/intel/pinctrl-lynxpoint.c:200:32: note: expected 'struct intel_pinctrl *' but argument is of type 'struct intel_pinctrl *'
static struct intel_community *lp_get_community(struct intel_pinctrl *lg,
^~~~~~~~~~~~~~~~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: At top level:
drivers/pinctrl/intel/pinctrl-lynxpoint.c:238:37: warning: 'struct intel_pinctrl' declared inside parameter list will not be visible outside of this definition or declaration
static bool lp_gpio_acpi_use(struct intel_pinctrl *lg, unsigned int pin)
^~~~~~~~~~~~~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_gpio_acpi_use':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:242:28: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
acpi_use = lp_gpio_reg(&lg->chip, pin, LP_ACPI_OWNED);
^~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_gpio_request':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:256:19: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
pm_runtime_get(lg->dev); /* should we put if failed */
^~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_gpio_free':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:283:19: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
pm_runtime_put(lg->dev);
^~
In file included from include/linux/radix-tree.h:16:0,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/pinctrl/intel/pinctrl-lynxpoint.c:9:
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_gpio_set':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:298:27: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
raw_spin_lock_irqsave(&lg->lock, flags);
^
include/linux/spinlock.h:250:34: note: in definition of macro 'raw_spin_lock_irqsave'
flags = _raw_spin_lock_irqsave(lock); \
^~~~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_gpio_direction_input':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:314:27: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
raw_spin_lock_irqsave(&lg->lock, flags);
^
include/linux/spinlock.h:250:34: note: in definition of macro 'raw_spin_lock_irqsave'
flags = _raw_spin_lock_irqsave(lock); \
^~~~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_gpio_direction_output':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:330:27: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
raw_spin_lock_irqsave(&lg->lock, flags);
^
include/linux/spinlock.h:250:34: note: in definition of macro 'raw_spin_lock_irqsave'
flags = _raw_spin_lock_irqsave(lock); \
^~~~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_gpio_irq_handler':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:358:26: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
for (base = 0; base < lg->chip.ngpio; base += 32) {
^~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_irq_ack':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:380:37: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
void __iomem *reg = lp_gpio_reg(&lg->chip, hwirq, LP_INT_STAT);
^~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_irq_enable':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:401:37: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
void __iomem *reg = lp_gpio_reg(&lg->chip, hwirq, LP_INT_ENABLE);
^~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_irq_disable':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:414:37: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
void __iomem *reg = lp_gpio_reg(&lg->chip, hwirq, LP_INT_ENABLE);
^~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_irq_set_type':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:427:37: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
void __iomem *reg = lp_gpio_reg(&lg->chip, hwirq, LP_CONFIG1);
^~
>> drivers/pinctrl/intel/pinctrl-lynxpoint.c:435:23: error: passing argument 1 of 'lp_gpio_acpi_use' from incompatible pointer type [-Werror=incompatible-pointer-types]
if (lp_gpio_acpi_use(lg, hwirq)) {
^~
drivers/pinctrl/intel/pinctrl-lynxpoint.c:238:13: note: expected 'struct intel_pinctrl *' but argument is of type 'struct intel_pinctrl *'
static bool lp_gpio_acpi_use(struct intel_pinctrl *lg, unsigned int pin)
^~~~~~~~~~~~~~~~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_gpio_irq_init_hw':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:488:26: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
for (base = 0; base < lg->chip.ngpio; base += 32) {
^~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_gpio_probe':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:515:32: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
lg = devm_kzalloc(dev, sizeof(*lg), GFP_KERNEL);
^~~
drivers/pinctrl/intel/pinctrl-lynxpoint.c: In function 'lp_gpio_resume':
drivers/pinctrl/intel/pinctrl-lynxpoint.c:622:20: error: dereferencing pointer to incomplete type 'struct intel_pinctrl'
for (i = 0; i < lg->chip.ngpio; i++) {
^~
cc1: some warnings being treated as errors
vim +206 drivers/pinctrl/intel/pinctrl-lynxpoint.c
170
171 /*
172 * Lynxpoint gpios are controlled through both bitmapped registers and
173 * per gpio specific registers. The bitmapped registers are in chunks of
174 * 3 x 32bit registers to cover all 95 GPIOs
175 *
176 * per gpio specific registers consist of two 32bit registers per gpio
177 * (LP_CONFIG1 and LP_CONFIG2), with 95 GPIOs there's a total of
178 * 190 config registers.
179 *
180 * A simplified view of the register layout look like this:
181 *
182 * LP_ACPI_OWNED[31:0] gpio ownerships for gpios 0-31 (bitmapped registers)
183 * LP_ACPI_OWNED[63:32] gpio ownerships for gpios 32-63
184 * LP_ACPI_OWNED[94:64] gpio ownerships for gpios 63-94
185 * ...
186 * LP_INT_ENABLE[31:0] ...
187 * LP_INT_ENABLE[63:32] ...
188 * LP_INT_ENABLE[94:64] ...
189 * LP0_CONFIG1 (gpio 0) config1 reg for gpio 0 (per gpio registers)
190 * LP0_CONFIG2 (gpio 0) config2 reg for gpio 0
191 * LP1_CONFIG1 (gpio 1) config1 reg for gpio 1
192 * LP1_CONFIG2 (gpio 1) config2 reg for gpio 1
193 * LP2_CONFIG1 (gpio 2) ...
194 * LP2_CONFIG2 (gpio 2) ...
195 * ...
196 * LP94_CONFIG1 (gpio 94) ...
197 * LP94_CONFIG2 (gpio 94) ...
198 */
199
> 200 static struct intel_community *lp_get_community(struct intel_pinctrl *lg,
201 unsigned int pin)
202 {
203 struct intel_community *comm;
204 int i;
205
> 206 for (i = 0; i < lg->ncommunities; i++) {
207 comm = &lg->communities[i];
208 if (pin < comm->pin_base + comm->npins && pin >= comm->pin_base)
209 return comm;
210 }
211
212 return NULL;
213 }
214
215 static void __iomem *lp_gpio_reg(struct gpio_chip *chip, unsigned int offset,
216 int reg)
217 {
218 struct intel_pinctrl *lg = gpiochip_get_data(chip);
219 struct intel_community *comm;
220 int reg_offset;
221
> 222 comm = lp_get_community(lg, offset);
223 if (!comm)
224 return NULL;
225
226 offset -= comm->pin_base;
227
228 if (reg == LP_CONFIG1 || reg == LP_CONFIG2)
229 /* per gpio specific config registers */
230 reg_offset = offset * 8;
231 else
232 /* bitmapped registers */
233 reg_offset = (offset / 32) * 4;
234
235 return comm->regs + reg_offset + reg;
236 }
237
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 71141 bytes --]
next prev parent reply other threads:[~2019-12-10 5:26 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-09 13:09 [PATCH v2 00/24] pinctrl: intel: Move Lynxpoint to pin control umbrella Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 01/24] pinctrl: lynxpoint: Move GPIO driver to pin controller folder Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 02/24] pinctrl: lynxpoint: Use raw_spinlock for locking Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 03/24] pinctrl: lynxpoint: Correct amount of pins Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 04/24] pinctrl: lynxpoint: Drop useless assignment Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 05/24] pinctrl: lynxpoint: Use %pR to print IO resource Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 06/24] pinctrl: lynxpoint: Use standard pattern for memory allocation Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 07/24] pinctrl: lynxpoint: Assume 2 bits for mode selector Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 08/24] pinctrl: lynxpoint: Relax GPIO request rules Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 09/24] pinctrl: lynxpoint: Keep pointer to struct device instead of its container Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 10/24] pinctrl: lynxpoint: Switch to memory mapped IO accessors Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 11/24] pinctrl: lynxpoint: Convert unsigned to unsigned int Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 12/24] pinctrl: lynxpoint: Extract lp_gpio_acpi_use() for future use Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 13/24] pinctrl: lynxpoint: Move ->remove closer to ->probe() Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 14/24] pinctrl: lynxpoint: Move lp_irq_type() closer to IRQ related routines Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 15/24] pinctrl: lynxpoint: Move ownership check to IRQ chip Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 16/24] pinctrl: lynxpoint: Implement ->irq_ack() callback Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 17/24] pinctrl: lynxpoint: Implement intel_gpio_get_direction callback Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 18/24] pinctrl: lynxpoint: Add pin control data structures Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 19/24] pinctrl: lynxpoint: Reuse struct intel_pinctrl in the driver Andy Shevchenko
2019-12-10 5:26 ` kbuild test robot [this message]
2019-12-10 13:46 ` Andy Shevchenko
2019-12-10 13:47 ` Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 20/24] pinctrl: lynxpoint: Add pin control operations Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 21/24] pinctrl: lynxpoint: Implement ->pin_dbg_show() Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 22/24] pinctrl: lynxpoint: Add GPIO <-> pin mapping ranges via callback Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 23/24] pinctrl: lynxpoint: Switch to pin control API Andy Shevchenko
2019-12-09 13:09 ` [PATCH v2 24/24] pinctrl: lynxpoint: Update summary in the driver Andy Shevchenko
2019-12-11 13:19 ` [PATCH v2 00/24] pinctrl: intel: Move Lynxpoint to pin control umbrella Mika Westerberg
2019-12-13 13:36 ` Linus Walleij
2019-12-13 14:44 ` Andy Shevchenko
2019-12-16 10:19 ` Linus Walleij
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=201912101342.yRdWiUtA%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.