* [PATCH] spi: spi-fsl-spi: Return an error code in fsl_spi_do_one_msg() @ 2014-12-04 13:15 Fabio Estevam [not found] ` <CAFSsGVv5=gJ2t-sWwTGqDcWaaYVU7o6VqZEL4mvxgohkkvBxmw@mail.gmail.com> [not found] ` <1417698947-4273-1-git-send-email-fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 0 siblings, 2 replies; 7+ messages in thread From: Fabio Estevam @ 2014-12-04 13:15 UTC (permalink / raw) To: broonie-DgEjT+Ai2ygdnm+yROfE0A Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, festevam-Re5JQEeQqe8AvxtiuMwx3w, hkallweit1-Re5JQEeQqe8AvxtiuMwx3w, Fabio Estevam Since commit c592becbe704127 ("spi: fsl-(e)spi: migrate to generic master queueing") the function fsl_spi_do_one_msg() is not void anymore, so return an error code to avoid the following buid warning: drivers/spi/spi-fsl-spi.c: In function 'fsl_spi_do_one_msg': >> drivers/spi/spi-fsl-spi.c:374:4: warning: 'return' with no value, in function returning non-void [-Wreturn-type] return; ^ Reported-by: kbuild test robot <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Signed-off-by: Fabio Estevam <fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- drivers/spi/spi-fsl-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c index e24a9bf..83f8081 100644 --- a/drivers/spi/spi-fsl-spi.c +++ b/drivers/spi/spi-fsl-spi.c @@ -371,7 +371,7 @@ static int fsl_spi_do_one_msg(struct spi_master *master, status = -EINVAL; dev_err(&spi->dev, "bits_per_word/speed_hz should be same for the same SPI transfer\n"); - return; + return -EINVAL; } } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 7+ messages in thread
[parent not found: <CAFSsGVv5=gJ2t-sWwTGqDcWaaYVU7o6VqZEL4mvxgohkkvBxmw@mail.gmail.com>]
[parent not found: <CAFSsGVv5=gJ2t-sWwTGqDcWaaYVU7o6VqZEL4mvxgohkkvBxmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] spi: spi-fsl-spi: Return an error code in fsl_spi_do_one_msg() [not found] ` <CAFSsGVv5=gJ2t-sWwTGqDcWaaYVU7o6VqZEL4mvxgohkkvBxmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2014-12-04 14:12 ` Fabio Estevam [not found] ` <CAOMZO5Dfs=+UP=76gzG1LisoWAZaYALxmXg0N+evTVCkFhSs5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Fabio Estevam @ 2014-12-04 14:12 UTC (permalink / raw) To: Heiner Kallweit Cc: Fabio Estevam, Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Thu, Dec 4, 2014 at 11:25 AM, Heiner Kallweit <hkallweit1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > Right, missed that. However the code was bogus before, the status = -EINVAL > didn't make sense as the value of variable status isn't used before the > return. > Therefore we can remove the "status = -EINVAL". Yes, I noticed that as well. > Shall I submit a patch or what would be your preferred approach? Yes, may be it would be better if you could submit a fix for this as separate patch, after Mark applies this one, so that we avoid conflicts. -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAOMZO5Dfs=+UP=76gzG1LisoWAZaYALxmXg0N+evTVCkFhSs5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] spi: spi-fsl-spi: Return an error code in fsl_spi_do_one_msg() [not found] ` <CAOMZO5Dfs=+UP=76gzG1LisoWAZaYALxmXg0N+evTVCkFhSs5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2014-12-04 18:18 ` Heiner Kallweit [not found] ` <5480A56E.8050308-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Heiner Kallweit @ 2014-12-04 18:18 UTC (permalink / raw) To: Fabio Estevam Cc: Fabio Estevam, Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Am 04.12.2014 um 15:12 schrieb Fabio Estevam: > On Thu, Dec 4, 2014 at 11:25 AM, Heiner Kallweit <hkallweit1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Right, missed that. However the code was bogus before, the status = -EINVAL >> didn't make sense as the value of variable status isn't used before the >> return. >> Therefore we can remove the "status = -EINVAL". > > Yes, I noticed that as well. > >> Shall I submit a patch or what would be your preferred approach? > > Yes, may be it would be better if you could submit a fix for this as > separate patch, after Mark applies this one, so that we avoid > conflicts. > OK, just submitted the fix as a separate patch. -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <5480A56E.8050308-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] spi: spi-fsl-spi: Return an error code in fsl_spi_do_one_msg() [not found] ` <5480A56E.8050308-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2014-12-04 18:52 ` Fabio Estevam [not found] ` <CAOMZO5Ahv23kjBXvapL8gGxtHcrOiEwnSXOAFyQ8RPBiK6rwKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Fabio Estevam @ 2014-12-04 18:52 UTC (permalink / raw) To: Heiner Kallweit Cc: Fabio Estevam, Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Thu, Dec 4, 2014 at 4:18 PM, Heiner Kallweit <hkallweit1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > OK, just submitted the fix as a separate patch. You mixed the two fixes in one patch. That was not really what I suggested. -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAOMZO5Ahv23kjBXvapL8gGxtHcrOiEwnSXOAFyQ8RPBiK6rwKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] spi: spi-fsl-spi: Return an error code in fsl_spi_do_one_msg() [not found] ` <CAOMZO5Ahv23kjBXvapL8gGxtHcrOiEwnSXOAFyQ8RPBiK6rwKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2014-12-04 19:29 ` Heiner Kallweit 0 siblings, 0 replies; 7+ messages in thread From: Heiner Kallweit @ 2014-12-04 19:29 UTC (permalink / raw) To: Fabio Estevam Cc: Fabio Estevam, Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Am 04.12.2014 um 19:52 schrieb Fabio Estevam: > On Thu, Dec 4, 2014 at 4:18 PM, Heiner Kallweit <hkallweit1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> OK, just submitted the fix as a separate patch. > > You mixed the two fixes in one patch. That was not really what I suggested. > Sorry, was a misunderstanding. I re-sent the fix with only removing the unused variable assignment. -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <1417698947-4273-1-git-send-email-fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* Re: [PATCH] spi: spi-fsl-spi: Return an error code in fsl_spi_do_one_msg() [not found] ` <1417698947-4273-1-git-send-email-fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2014-12-04 13:34 ` Heiner Kallweit 2014-12-04 22:44 ` Mark Brown 1 sibling, 0 replies; 7+ messages in thread From: Heiner Kallweit @ 2014-12-04 13:34 UTC (permalink / raw) To: Fabio Estevam Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A, linux-spi-u79uwXL29TY76Z2rM5mHXA, festevam-Re5JQEeQqe8AvxtiuMwx3w Right, missed that. However the code was bogus before, the status = -EINVAL didn't make sense as the value of variable status isn't used before the return. Therefore we can remove the "status = -EINVAL". Shall I submit a patch or what would be your preferred approach? On Thu, Dec 4, 2014 at 2:15 PM, Fabio Estevam <fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org> wrote: > Since commit c592becbe704127 ("spi: fsl-(e)spi: migrate to generic master > queueing") the function fsl_spi_do_one_msg() is not void anymore, so return > an error code to avoid the following buid warning: > > drivers/spi/spi-fsl-spi.c: In function 'fsl_spi_do_one_msg': >>> drivers/spi/spi-fsl-spi.c:374:4: warning: 'return' with no value, in function returning non-void [-Wreturn-type] > return; > ^ > > Reported-by: kbuild test robot <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Signed-off-by: Fabio Estevam <fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > --- > drivers/spi/spi-fsl-spi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c > index e24a9bf..83f8081 100644 > --- a/drivers/spi/spi-fsl-spi.c > +++ b/drivers/spi/spi-fsl-spi.c > @@ -371,7 +371,7 @@ static int fsl_spi_do_one_msg(struct spi_master *master, > status = -EINVAL; > dev_err(&spi->dev, > "bits_per_word/speed_hz should be same for the same SPI transfer\n"); > - return; > + return -EINVAL; > } > } > > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] spi: spi-fsl-spi: Return an error code in fsl_spi_do_one_msg() [not found] ` <1417698947-4273-1-git-send-email-fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2014-12-04 13:34 ` Heiner Kallweit @ 2014-12-04 22:44 ` Mark Brown 1 sibling, 0 replies; 7+ messages in thread From: Mark Brown @ 2014-12-04 22:44 UTC (permalink / raw) To: Fabio Estevam Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, festevam-Re5JQEeQqe8AvxtiuMwx3w, hkallweit1-Re5JQEeQqe8AvxtiuMwx3w [-- Attachment #1: Type: text/plain, Size: 288 bytes --] On Thu, Dec 04, 2014 at 11:15:47AM -0200, Fabio Estevam wrote: > Since commit c592becbe704127 ("spi: fsl-(e)spi: migrate to generic master > queueing") the function fsl_spi_do_one_msg() is not void anymore, so return > an error code to avoid the following buid warning: Applied, thanks. [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 473 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-12-04 22:44 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-12-04 13:15 [PATCH] spi: spi-fsl-spi: Return an error code in fsl_spi_do_one_msg() Fabio Estevam [not found] ` <CAFSsGVv5=gJ2t-sWwTGqDcWaaYVU7o6VqZEL4mvxgohkkvBxmw@mail.gmail.com> [not found] ` <CAFSsGVv5=gJ2t-sWwTGqDcWaaYVU7o6VqZEL4mvxgohkkvBxmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-12-04 14:12 ` Fabio Estevam [not found] ` <CAOMZO5Dfs=+UP=76gzG1LisoWAZaYALxmXg0N+evTVCkFhSs5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-12-04 18:18 ` Heiner Kallweit [not found] ` <5480A56E.8050308-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2014-12-04 18:52 ` Fabio Estevam [not found] ` <CAOMZO5Ahv23kjBXvapL8gGxtHcrOiEwnSXOAFyQ8RPBiK6rwKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-12-04 19:29 ` Heiner Kallweit [not found] ` <1417698947-4273-1-git-send-email-fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2014-12-04 13:34 ` Heiner Kallweit 2014-12-04 22:44 ` Mark Brown
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).