Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751413AbbGLOGq (ORCPT ); Sun, 12 Jul 2015 10:06:46 -0400 Received: from mout.gmx.net ([212.227.17.21]:57554 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750954AbbGLOGn (ORCPT ); Sun, 12 Jul 2015 10:06:43 -0400 Date: Sun, 12 Jul 2015 16:06:23 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: Robert Jarzmik cc: Mauro Carvalho Chehab , Jiri Kosina , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Robert Jarzmik Subject: Re: [PATCH v2 3/4] media: pxa_camera: trivial move of dma irq functions In-Reply-To: <1436120872-24484-4-git-send-email-robert.jarzmik@free.fr> Message-ID: References: <1436120872-24484-1-git-send-email-robert.jarzmik@free.fr> <1436120872-24484-4-git-send-email-robert.jarzmik@free.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Provags-ID: V03:K0:cni/Nx+oa0gFdIRwLza1mT82NnhqZoDJhma1RXs48ms52BrPVh3 eAHVHsOP1kvQ7I/MUdMvEOx60tZY8mkTXDBVGfbfADCLuKfiobpldt+jznabHbxKiNFixKR 5ifh0h1vY2hNqkIr1fDXLgkaDO2xY6nofeeTjqtVC6hJypUC37lIfFFyAC62Z3BmLH9tnW6 HzJBa9xxSn15gD0tjJpcA== X-UI-Out-Filterresults: notjunk:1;V01:K0:d3w7iABmi4w=:LVyHQ8NaC7l8maDpMdhtnu F7yJAuEdiOcJ5g41yuvNusTVtlsvnd7k6AZjL0LS7WhTUji2ZA6mpfA+5u0K8OkU4+lPYlXWs OU48CWyY6cHAIwzU6jUKeb/ZmJ4Tic2Ruw2aCU6hSMG1QnT5L/oXKZ1JV6zzyEuEQfdrGgmOd NZufDCsMaE0/77DmNgyojBye/0LiA/V+40AHn2BYhpNy/upeaYRSa+bL+MxzCr6sQWXdZ6nHr AOvUncM8i18FCb0P5WKzFO0ih0ppc7pYUDnnrAZy6ySq7T1LQmcuIL1h50edHA78sv6YKV+50 6sC8YUqbC5Iwju4JwL9UwKNRxY6MiNpcS4Q7dPgOAQlK5ykagq0xR54RjuEaboj+VZ7v/ynAc +8xxQXTjiI7kVRquD8kQ83WU/UdcVjq0g8Fz4BQaSKIzddHJVmFo+WM16GK8OTM8Ggdm7mFmS FRCgUn1iGZqz4BipBdmuIwU8cvVdk29ZZ0oMCR0DMPxr9GF5heZQ+B+q7H2bnMxM9jA4UVxhl IF2BOm3XYQmGWV/IujtH1I4sXannQQYzSO3BxTCCT0djC6IcbDPQte7AzF2G1lVMWxQVkgAzi XfJpmSZ2MOPP5U7SEpYVt4uyvd/DbDxkvMP2jm4XPttqjNdtXA4naT56WGs6rZMs63r9Xw2aC gD16oUojY93bpG3lFPeyWJFkzyhJxRq1zzYnhNbbs5+w0aY1izUVjtWhPLT+AXjae8xQ= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2789 Lines: 90 On Sun, 5 Jul 2015, Robert Jarzmik wrote: > From: Robert Jarzmik > > This moves the dma irq handling functions up in the source file, so that > they are available before DMA preparation functions. It prepares the > conversion to DMA engine, where the descriptors are populated with these > functions as callbacks. > > Signed-off-by: Robert Jarzmik > --- > Since v1: fixed prototypes change > --- > drivers/media/platform/soc_camera/pxa_camera.c | 40 ++++++++++++++------------ > 1 file changed, 22 insertions(+), 18 deletions(-) > > diff --git a/drivers/media/platform/soc_camera/pxa_camera.c b/drivers/media/platform/soc_camera/pxa_camera.c > index c0c0f0f..1ab4f9d 100644 > --- a/drivers/media/platform/soc_camera/pxa_camera.c > +++ b/drivers/media/platform/soc_camera/pxa_camera.c > @@ -311,6 +311,28 @@ static int calculate_dma_sglen(struct scatterlist *sglist, int sglen, > > BUG_ON(size != 0); > return i + 1; > +static void pxa_camera_dma_irq(struct pxa_camera_dev *pcdev, > + enum pxa_camera_active_dma act_dma); Yes, functions look ok now as the sense - they are just moved up with no modifications, but the patch itself looks as broken to me as it originally was... Please, look 2 lines up - where you add your lines. Thanks Guennadi > + > +static void pxa_camera_dma_irq_y(int channel, void *data) > +{ > + struct pxa_camera_dev *pcdev = data; > + > + pxa_camera_dma_irq(pcdev, DMA_Y); > +} > + > +static void pxa_camera_dma_irq_u(int channel, void *data) > +{ > + struct pxa_camera_dev *pcdev = data; > + > + pxa_camera_dma_irq(pcdev, DMA_U); > +} > + > +static void pxa_camera_dma_irq_v(int channel, void *data) > +{ > + struct pxa_camera_dev *pcdev = data; > + > + pxa_camera_dma_irq(pcdev, DMA_V); > } > > /** > @@ -810,24 +832,6 @@ out: > spin_unlock_irqrestore(&pcdev->lock, flags); > } > > -static void pxa_camera_dma_irq_y(int channel, void *data) > -{ > - struct pxa_camera_dev *pcdev = data; > - pxa_camera_dma_irq(channel, pcdev, DMA_Y); > -} > - > -static void pxa_camera_dma_irq_u(int channel, void *data) > -{ > - struct pxa_camera_dev *pcdev = data; > - pxa_camera_dma_irq(channel, pcdev, DMA_U); > -} > - > -static void pxa_camera_dma_irq_v(int channel, void *data) > -{ > - struct pxa_camera_dev *pcdev = data; > - pxa_camera_dma_irq(channel, pcdev, DMA_V); > -} > - > static struct videobuf_queue_ops pxa_videobuf_ops = { > .buf_setup = pxa_videobuf_setup, > .buf_prepare = pxa_videobuf_prepare, > -- > 2.1.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/