Message ID | 1432761820-32072-1-git-send-email-robert.jarzmik@free.fr (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wednesday 27 May 2015 23:23:40 Robert Jarzmik wrote: > This fixes the following error: > drivers/dma/pxa_dma.c: In function ‘dbg_show_requester_chan’: > drivers/dma/pxa_dma.c:192:2: error: void value not ignored as it ought to be > pos += seq_printf(s, "DMA channel %d requester :\n", phy->idx); > ^ > drivers/dma/pxa_dma.c:197:8: error: void value not ignored as it ought to be > !!(drcmr & DRCMR_MAPVLD)); > ^ > scripts/Makefile.build:258: recipe for target 'drivers/dma/pxa_dma.o' failed > > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> > Acked-by: Arnd Bergmann <arnd@arndb.de> I ran into the problem yesterday and came up with the same fix, but you submitted it first, thanks! Arnd
On Wed, May 27, 2015 at 11:23:40PM +0200, Robert Jarzmik wrote: > This fixes the following error: > drivers/dma/pxa_dma.c: In function ‘dbg_show_requester_chan’: > drivers/dma/pxa_dma.c:192:2: error: void value not ignored as it ought to be > pos += seq_printf(s, "DMA channel %d requester :\n", phy->idx); > ^ > drivers/dma/pxa_dma.c:197:8: error: void value not ignored as it ought to be > !!(drcmr & DRCMR_MAPVLD)); > ^ > scripts/Makefile.build:258: recipe for target 'drivers/dma/pxa_dma.o' failed Applied now, but not pleased that you sent broken code. Sending stuff that compiles is basic step
----- Mail original ----- De: "Vinod Koul" <vinod.koul@intel.com> À: "Robert Jarzmik" <robert.jarzmik@free.fr> On Wed, May 27, 2015 at 11:23:40PM +0200, Robert Jarzmik wrote: > This fixes the following error: > drivers/dma/pxa_dma.c: In function ‘dbg_show_requester_chan’: > drivers/dma/pxa_dma.c:192:2: error: void value not ignored as it ought to be > pos += seq_printf(s, "DMA channel %d requester :\n", phy->idx); > Applied now. Thanks. > but not pleased that you sent broken code. Sending stuff that > compiles is basic step You should know me better by now. I told you I compiled *and* tested. And with a a bit closer look check this commit, especially the date : commit 0bac33653b06a5f80a5c04e275eb33db9493b85a Author: Joe Perches <joe@perches.com> Date: Sat May 23 12:00:38 2015 +1000 fs/seq_file: convert int seq_vprint/seq_printf/etc... returns to void Cheers. -- Robert
On Fri, 2015-05-29 at 11:29 +0200, robert.jarzmik@free.fr wrote: > ----- Mail original ----- > De: "Vinod Koul" <vinod.koul@intel.com> > On Wed, May 27, 2015 at 11:23:40PM +0200, Robert Jarzmik wrote: > > This fixes the following error: [] > And with a a bit closer look check this commit, especially the date : > commit 0bac33653b06a5f80a5c04e275eb33db9493b85a > Author: Joe Perches <joe@perches.com> > Date: Sat May 23 12:00:38 2015 +1000 > > fs/seq_file: convert int seq_vprint/seq_printf/etc... returns to void Hello Robert. The return value of that dbg_show_requester_chan function was incorrect and the increment of pos was an example of why the seq_printf return value was changed to void. It was a pretty common error and easy to understand given the expectation that seq_printf should work like printf. It's a pity it bit you. but this type of patch collision should be a bit more difficult to reoccur in the future. cheers, Joe
Joe Perches <joe@perches.com> writes: > Hello Robert. > > The return value of that dbg_show_requester_chan function > was incorrect and the increment of pos was an example of > why the seq_printf return value was changed to void. > > It was a pretty common error and easy to understand given > the expectation that seq_printf should work like printf. Sure. > It's a pity it bit you. but this type of patch collision > should be a bit more difficult to reoccur in the future. I got what I deserved. I knew it was coming, I've seen it in other drivers of mine, but my left brain didn't tell the other half to crosscheck in this patch. Anyway, it's not a big fixup, so everything is fine now. Cheers.
diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c index ddcbbf5..be5b524 100644 --- a/drivers/dma/pxa_dma.c +++ b/drivers/dma/pxa_dma.c @@ -184,19 +184,18 @@ static unsigned int pxad_drcmr(unsigned int line) static int dbg_show_requester_chan(struct seq_file *s, void *p) { - int pos = 0; struct pxad_phy *phy = s->private; int i; u32 drcmr; - pos += seq_printf(s, "DMA channel %d requester :\n", phy->idx); + seq_printf(s, "DMA channel %d requester :\n", phy->idx); for (i = 0; i < 70; i++) { drcmr = readl_relaxed(phy->base + pxad_drcmr(i)); if ((drcmr & DRCMR_CHLNUM) == phy->idx) - pos += seq_printf(s, "\tRequester %d (MAPVLD=%d)\n", i, - !!(drcmr & DRCMR_MAPVLD)); + seq_printf(s, "\tRequester %d (MAPVLD=%d)\n", i, + !!(drcmr & DRCMR_MAPVLD)); } - return pos; + return 0; } static inline int dbg_burst_from_dcmd(u32 dcmd)
This fixes the following error: drivers/dma/pxa_dma.c: In function ‘dbg_show_requester_chan’: drivers/dma/pxa_dma.c:192:2: error: void value not ignored as it ought to be pos += seq_printf(s, "DMA channel %d requester :\n", phy->idx); ^ drivers/dma/pxa_dma.c:197:8: error: void value not ignored as it ought to be !!(drcmr & DRCMR_MAPVLD)); ^ scripts/Makefile.build:258: recipe for target 'drivers/dma/pxa_dma.o' failed Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> --- drivers/dma/pxa_dma.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)