* [bug report] pinctrl: Introduce TI IOdelay configuration driver
@ 2017-01-12 19:14 Dan Carpenter
2017-01-13 20:44 ` Nishanth Menon
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-01-12 19:14 UTC (permalink / raw)
To: nm; +Cc: linux-gpio
Hello Nishanth Menon,
The patch 003910ebc83b: "pinctrl: Introduce TI IOdelay configuration
driver" from Jan 5, 2017, leads to the following static checker
warning:
drivers/pinctrl/ti/pinctrl-ti-iodelay.c:668 ti_iodelay_pin_dbg_show()
warn: unsigned 'pin' is never less than zero.
drivers/pinctrl/ti/pinctrl-ti-iodelay.c
653 static void ti_iodelay_pin_dbg_show(struct pinctrl_dev *pctldev,
654 struct seq_file *s,
655 unsigned int pin)
^^^^^^^^^^^^^^^^
656 {
657 struct ti_iodelay_device *iod;
658 struct pinctrl_pin_desc *pd;
659 struct ti_iodelay_cfg *cfg;
660 const struct ti_iodelay_reg_data *r;
661 unsigned long offset;
662 u32 in, oen, out;
663
664 iod = pinctrl_dev_get_drvdata(pctldev);
665 r = iod->reg_data;
666
667 offset = ti_iodelay_pin_to_offset(iod, pin);
^^^
668 if (pin < 0) {
^^^^^^^
669 dev_err(iod->dev, "invalid pin offset for pin%i\n", pin);
670
671 return;
672 }
It looks to me like probably this code coulde be safely deleted?
673
674 pd = &iod->pa[pin];
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug report] pinctrl: Introduce TI IOdelay configuration driver
2017-01-12 19:14 [bug report] pinctrl: Introduce TI IOdelay configuration driver Dan Carpenter
@ 2017-01-13 20:44 ` Nishanth Menon
0 siblings, 0 replies; 2+ messages in thread
From: Nishanth Menon @ 2017-01-13 20:44 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-gpio, Colin Ian King, tony
On 01/12/2017 01:14 PM, Dan Carpenter wrote:
> Hello Nishanth Menon,
>
> The patch 003910ebc83b: "pinctrl: Introduce TI IOdelay configuration
> driver" from Jan 5, 2017, leads to the following static checker
> warning:
>
> drivers/pinctrl/ti/pinctrl-ti-iodelay.c:668 ti_iodelay_pin_dbg_show()
> warn: unsigned 'pin' is never less than zero.
>
> drivers/pinctrl/ti/pinctrl-ti-iodelay.c
> 653 static void ti_iodelay_pin_dbg_show(struct pinctrl_dev *pctldev,
> 654 struct seq_file *s,
> 655 unsigned int pin)
> ^^^^^^^^^^^^^^^^
> 656 {
> 657 struct ti_iodelay_device *iod;
> 658 struct pinctrl_pin_desc *pd;
> 659 struct ti_iodelay_cfg *cfg;
> 660 const struct ti_iodelay_reg_data *r;
> 661 unsigned long offset;
> 662 u32 in, oen, out;
> 663
> 664 iod = pinctrl_dev_get_drvdata(pctldev);
> 665 r = iod->reg_data;
> 666
> 667 offset = ti_iodelay_pin_to_offset(iod, pin);
> ^^^
> 668 if (pin < 0) {
> ^^^^^^^
> 669 dev_err(iod->dev, "invalid pin offset for pin%i\n", pin);
> 670
> 671 return;
> 672 }
>
> It looks to me like probably this code coulde be safely deleted?
yeah it is valid to be removed - had missed your note. Colin also
noticed and provided a patch
https://patchwork.kernel.org/patch/9515653/ for the same.
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-13 20:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-12 19:14 [bug report] pinctrl: Introduce TI IOdelay configuration driver Dan Carpenter
2017-01-13 20:44 ` Nishanth Menon
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.