Re: [RESEND PATCH 4/14] staging/media/as102: checkpatch fixes
On 10/18/2011 09:51 PM, Piotr Chmura wrote: Patch taken from http://kernellabs.com/hg/~dheitmueller/v4l-dvb-as102-2/ Original source and comment: # HG changeset patch # User Devin Heitmuellerdheitmuel...@kernellabs.com # Date 1267318701 18000 # Node ID 69c8f5172790784738bcc18f8301919ef3d5373f # Parent b91e96a07bee27c1d421b4c3702e33ee8075de83 as102: checkpatch fixes From: Devin Heitmuellerdheitmuel...@kernellabs.com Fix make checkpatch issues reported against as10x_cmd.c. Priority: normal Signed-off-by: Devin Heitmuellerdheitmuel...@kernellabs.com Signed-off-by: Piotr Chmurachmoor...@poczta.onet.pl Hi Piotr, starting from this patch the series doesn't apply cleanly to staging/for_v3.2 tree. Which branch is it based on ? --- Thanks, Sylwester -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND PATCH 4/14] staging/media/as102: checkpatch fixes
W dniu 29.10.2011 12:22, Sylwester Nawrocki pisze: On 10/18/2011 09:51 PM, Piotr Chmura wrote: Patch taken from http://kernellabs.com/hg/~dheitmueller/v4l-dvb-as102-2/ Original source and comment: # HG changeset patch # User Devin Heitmuellerdheitmuel...@kernellabs.com # Date 1267318701 18000 # Node ID 69c8f5172790784738bcc18f8301919ef3d5373f # Parent b91e96a07bee27c1d421b4c3702e33ee8075de83 as102: checkpatch fixes From: Devin Heitmuellerdheitmuel...@kernellabs.com Fix make checkpatch issues reported against as10x_cmd.c. Priority: normal Signed-off-by: Devin Heitmuellerdheitmuel...@kernellabs.com Signed-off-by: Piotr Chmurachmoor...@poczta.onet.pl Hi Piotr, starting from this patch the series doesn't apply cleanly to staging/for_v3.2 tree. Which branch is it based on ? --- Thanks, Sylwester Hi Sylwester, I'is based on git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git kernel-3.1.0-git9+ All patches are working on newly created driver directory drivers/staging/media/as102 (exception is 13/14: staging/Makefile and staging/Kconfig) and they apply cleanly in my tree. Let me know why they doesn't on yours and i'll try to fix them. Thanks, Piotr -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND PATCH 4/14] staging/media/as102: checkpatch fixes
Hi, On 10/29/2011 03:17 PM, Piotr Chmura wrote: W dniu 29.10.2011 12:22, Sylwester Nawrocki pisze: On 10/18/2011 09:51 PM, Piotr Chmura wrote: Patch taken from http://kernellabs.com/hg/~dheitmueller/v4l-dvb-as102-2/ Original source and comment: # HG changeset patch # User Devin Heitmuellerdheitmuel...@kernellabs.com # Date 1267318701 18000 # Node ID 69c8f5172790784738bcc18f8301919ef3d5373f # Parent b91e96a07bee27c1d421b4c3702e33ee8075de83 as102: checkpatch fixes From: Devin Heitmuellerdheitmuel...@kernellabs.com Fix make checkpatch issues reported against as10x_cmd.c. Priority: normal Signed-off-by: Devin Heitmuellerdheitmuel...@kernellabs.com Signed-off-by: Piotr Chmurachmoor...@poczta.onet.pl Hi Piotr, starting from this patch the series doesn't apply cleanly to staging/for_v3.2 tree. Which branch is it based on ? --- Thanks, Sylwester Hi Sylwester, I'is based on git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git kernel-3.1.0-git9+ All patches are working on newly created driver directory drivers/staging/media/as102 (exception is 13/14: staging/Makefile and staging/Kconfig) and they apply cleanly in my tree. Let me know why they doesn't on yours and i'll try to fix them. I suspect the patch got mangled. The base tree shouldn't matter that much since the patches are touching only the newly created directory. With you previous patch set I'm getting an error at patch 5/11. snawrocki@vostro:~/linux/media_tree$ git am -3 RESEND-1-14-staging-media-as102-initial-import-from-Abilis.patch Applying: staging/media/as102: initial import from Abilis snawrocki@vostro:~/linux/media_tree$ git am -3 RESEND-2-14-staging-media-as102-checkpatch-fixes.patch Applying: staging/media/as102: checkpatch fixes snawrocki@vostro:~/linux/media_tree$ git am -3 RESEND-3-14-staging-media-as102-checkpatch-fixes.patch Applying: staging/media/as102: checkpatch fixes snawrocki@vostro:~/linux/media_tree$ git am -3 RESEND-4-14-staging-media-as102-checkpatch-fixes.patch Applying: staging/media/as102: checkpatch fixes fatal: corrupt patch at line 664 Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 staging/media/as102: checkpatch fixes When you have resolved this problem run git am --resolved. If you would prefer to skip this patch, instead run git am --skip. To restore the original branch and stop patching run git am --abort. snawrocki@vostro:~/linux/media_tree$ git apply --verbose --reject RESEND-4-14-staging-media-as102-checkpatch-fixes.patch fatal: corrupt patch at line 702 snawrocki@vostro:~/linux/media_tree$ git ll cbcbb4b staging/media/as102: checkpatch fixes acde12d staging/media/as102: checkpatch fixes d47fc51 staging/media/as102: initial import from Abilis ... You are not using git send-email to send the patches, are you ? -- Regards, Sylwester -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND PATCH 4/14] staging/media/as102: checkpatch fixes
W dniu 29.10.2011 15:17, Piotr Chmura pisze: W dniu 29.10.2011 12:22, Sylwester Nawrocki pisze: On 10/18/2011 09:51 PM, Piotr Chmura wrote: Patch taken from http://kernellabs.com/hg/~dheitmueller/v4l-dvb-as102-2/ Original source and comment: # HG changeset patch # User Devin Heitmuellerdheitmuel...@kernellabs.com # Date 1267318701 18000 # Node ID 69c8f5172790784738bcc18f8301919ef3d5373f # Parent b91e96a07bee27c1d421b4c3702e33ee8075de83 as102: checkpatch fixes From: Devin Heitmuellerdheitmuel...@kernellabs.com Fix make checkpatch issues reported against as10x_cmd.c. Priority: normal Signed-off-by: Devin Heitmuellerdheitmuel...@kernellabs.com Signed-off-by: Piotr Chmurachmoor...@poczta.onet.pl Hi Piotr, starting from this patch the series doesn't apply cleanly to staging/for_v3.2 tree. Which branch is it based on ? --- Thanks, Sylwester Hi Sylwester, I'is based on git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git kernel-3.1.0-git9+ All patches are working on newly created driver directory drivers/staging/media/as102 (exception is 13/14: staging/Makefile and staging/Kconfig) and they apply cleanly in my tree. Let me know why they doesn't on yours and i'll try to fix them. One more thing... patches starting from 4/14 in patchwork have To unsubscribe from this list: send the line unsubscribe linux-media in... on the end. Isn't this making them wrong ? Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND PATCH 4/14] staging/media/as102: checkpatch fixes
On 10/29/2011 06:25 PM, Piotr Chmura wrote: W dniu 29.10.2011 15:17, Piotr Chmura pisze: W dniu 29.10.2011 12:22, Sylwester Nawrocki pisze: On 10/18/2011 09:51 PM, Piotr Chmura wrote: Patch taken from http://kernellabs.com/hg/~dheitmueller/v4l-dvb-as102-2/ Original source and comment: # HG changeset patch # User Devin Heitmuellerdheitmuel...@kernellabs.com # Date 1267318701 18000 # Node ID 69c8f5172790784738bcc18f8301919ef3d5373f # Parent b91e96a07bee27c1d421b4c3702e33ee8075de83 as102: checkpatch fixes From: Devin Heitmuellerdheitmuel...@kernellabs.com Fix make checkpatch issues reported against as10x_cmd.c. Priority: normal Signed-off-by: Devin Heitmuellerdheitmuel...@kernellabs.com Signed-off-by: Piotr Chmurachmoor...@poczta.onet.pl Hi Piotr, starting from this patch the series doesn't apply cleanly to staging/for_v3.2 tree. Which branch is it based on ? --- Thanks, Sylwester Hi Sylwester, I'is based on git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git kernel-3.1.0-git9+ All patches are working on newly created driver directory drivers/staging/media/as102 (exception is 13/14: staging/Makefile and staging/Kconfig) and they apply cleanly in my tree. Let me know why they doesn't on yours and i'll try to fix them. One more thing... patches starting from 4/14 in patchwork have To unsubscribe from this list: send the line unsubscribe linux-media in... on the end. Isn't this making them wrong ? This shouldn't be an issue, I've also used patches saved directly form an e-mail client which didn't have this text appended and the patch didn't apply in same way. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND PATCH 4/14] staging/media/as102: checkpatch fixes
On Sat, Oct 29, 2011 at 06:39:54PM +0200, Sylwester Nawrocki wrote: Hi Sylwester, I'is based on git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git kernel-3.1.0-git9+ All patches are working on newly created driver directory drivers/staging/media/as102 (exception is 13/14: staging/Makefile and staging/Kconfig) and they apply cleanly in my tree. Let me know why they doesn't on yours and i'll try to fix them. One more thing... patches starting from 4/14 in patchwork have To unsubscribe from this list: send the line unsubscribe linux-media in... on the end. Isn't this making them wrong ? This shouldn't be an issue, I've also used patches saved directly form an e-mail client which didn't have this text appended and the patch didn't apply in same way. I get this error when I try apply them. patching file drivers/staging/media/as102/as10x_cmd.c patch: malformed patch at line 696: ___ I'm applying with patch not with git am. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND PATCH 4/14] staging/media/as102: checkpatch fixes
W dniu 29.10.2011 18:14, Sylwester Nawrocki pisze: Hi, On 10/29/2011 03:17 PM, Piotr Chmura wrote: W dniu 29.10.2011 12:22, Sylwester Nawrocki pisze: On 10/18/2011 09:51 PM, Piotr Chmura wrote: Patch taken from http://kernellabs.com/hg/~dheitmueller/v4l-dvb-as102-2/ Original source and comment: # HG changeset patch # User Devin Heitmuellerdheitmuel...@kernellabs.com # Date 1267318701 18000 # Node ID 69c8f5172790784738bcc18f8301919ef3d5373f # Parent b91e96a07bee27c1d421b4c3702e33ee8075de83 as102: checkpatch fixes From: Devin Heitmuellerdheitmuel...@kernellabs.com Fix make checkpatch issues reported against as10x_cmd.c. Priority: normal Signed-off-by: Devin Heitmuellerdheitmuel...@kernellabs.com Signed-off-by: Piotr Chmurachmoor...@poczta.onet.pl Hi Piotr, starting from this patch the series doesn't apply cleanly to staging/for_v3.2 tree. Which branch is it based on ? --- Thanks, Sylwester Hi Sylwester, I'is based on git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git kernel-3.1.0-git9+ All patches are working on newly created driver directory drivers/staging/media/as102 (exception is 13/14: staging/Makefile and staging/Kconfig) and they apply cleanly in my tree. Let me know why they doesn't on yours and i'll try to fix them. I suspect the patch got mangled. The base tree shouldn't matter that much since the patches are touching only the newly created directory. With you previous patch set I'm getting an error at patch 5/11. snawrocki@vostro:~/linux/media_tree$ git am -3 RESEND-1-14-staging-media-as102-initial-import-from-Abilis.patch Applying: staging/media/as102: initial import from Abilis snawrocki@vostro:~/linux/media_tree$ git am -3 RESEND-2-14-staging-media-as102-checkpatch-fixes.patch Applying: staging/media/as102: checkpatch fixes snawrocki@vostro:~/linux/media_tree$ git am -3 RESEND-3-14-staging-media-as102-checkpatch-fixes.patch Applying: staging/media/as102: checkpatch fixes snawrocki@vostro:~/linux/media_tree$ git am -3 RESEND-4-14-staging-media-as102-checkpatch-fixes.patch Applying: staging/media/as102: checkpatch fixes fatal: corrupt patch at line 664 Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 staging/media/as102: checkpatch fixes When you have resolved this problem run git am --resolved. If you would prefer to skip this patch, instead run git am --skip. To restore the original branch and stop patching run git am --abort. I've downloaded patches from patchwork, as expected by you: dom@darkstar ~/src/kernel/linux.trynew $ patch -p1 -i RESEND-4-14-staging-media-as102-checkpatch-fixes.patch patching file drivers/staging/media/as102/as10x_cmd.c patch: malformed patch at line 664: To unsubscribe from this list: send the line unsubscribe linux-media in after removing -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org from end of file: dom@darkstar ~/src/kernel/linux.trynew $ patch -p1 -i RESEND-4-14-staging-media-as102-checkpatch-fixes.patch patching file drivers/staging/media/as102/as10x_cmd.c Works fine, so looks like footer of mailing list IS an issue here (there are less then 3 lines in patch because of end of file). snawrocki@vostro:~/linux/media_tree$ git apply --verbose --reject RESEND-4-14-staging-media-as102-checkpatch-fixes.patch fatal: corrupt patch at line 702 snawrocki@vostro:~/linux/media_tree$ git ll cbcbb4b staging/media/as102: checkpatch fixes acde12d staging/media/as102: checkpatch fixes d47fc51 staging/media/as102: initial import from Abilis ... You are not using git send-email to send the patches, are you ? I'm not using git for sending patches. Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND PATCH 4/14] staging/media/as102: checkpatch fixes
On 10/29/2011 07:48 PM, Piotr Chmura wrote: W dniu 29.10.2011 18:14, Sylwester Nawrocki pisze: On 10/29/2011 03:17 PM, Piotr Chmura wrote: W dniu 29.10.2011 12:22, Sylwester Nawrocki pisze: On 10/18/2011 09:51 PM, Piotr Chmura wrote: Patch taken from http://kernellabs.com/hg/~dheitmueller/v4l-dvb-as102-2/ Original source and comment: # HG changeset patch # User Devin Heitmuellerdheitmuel...@kernellabs.com # Date 1267318701 18000 # Node ID 69c8f5172790784738bcc18f8301919ef3d5373f # Parent b91e96a07bee27c1d421b4c3702e33ee8075de83 as102: checkpatch fixes From: Devin Heitmuellerdheitmuel...@kernellabs.com Fix make checkpatch issues reported against as10x_cmd.c. Priority: normal Signed-off-by: Devin Heitmuellerdheitmuel...@kernellabs.com Signed-off-by: Piotr Chmurachmoor...@poczta.onet.pl Hi Piotr, starting from this patch the series doesn't apply cleanly to staging/for_v3.2 tree. Which branch is it based on ? --- Thanks, Sylwester Hi Sylwester, I'is based on git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git kernel-3.1.0-git9+ All patches are working on newly created driver directory drivers/staging/media/as102 (exception is 13/14: staging/Makefile and staging/Kconfig) and they apply cleanly in my tree. Let me know why they doesn't on yours and i'll try to fix them. I suspect the patch got mangled. The base tree shouldn't matter that much since the patches are touching only the newly created directory. With you previous patch set I'm getting an error at patch 5/11. snawrocki@vostro:~/linux/media_tree$ git am -3 RESEND-1-14-staging-media-as102-initial-import-from-Abilis.patch Applying: staging/media/as102: initial import from Abilis snawrocki@vostro:~/linux/media_tree$ git am -3 RESEND-2-14-staging-media-as102-checkpatch-fixes.patch Applying: staging/media/as102: checkpatch fixes snawrocki@vostro:~/linux/media_tree$ git am -3 RESEND-3-14-staging-media-as102-checkpatch-fixes.patch Applying: staging/media/as102: checkpatch fixes snawrocki@vostro:~/linux/media_tree$ git am -3 RESEND-4-14-staging-media-as102-checkpatch-fixes.patch Applying: staging/media/as102: checkpatch fixes fatal: corrupt patch at line 664 Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 staging/media/as102: checkpatch fixes When you have resolved this problem run git am --resolved. If you would prefer to skip this patch, instead run git am --skip. To restore the original branch and stop patching run git am --abort. I've downloaded patches from patchwork, as expected by you: dom@darkstar ~/src/kernel/linux.trynew $ patch -p1 -i RESEND-4-14-staging-media-as102-checkpatch-fixes.patch patching file drivers/staging/media/as102/as10x_cmd.c patch: malformed patch at line 664: To unsubscribe from this list: send the line unsubscribe linux-media in after removing -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org from end of file: dom@darkstar ~/src/kernel/linux.trynew $ patch -p1 -i RESEND-4-14-staging-media-as102-checkpatch-fixes.patch patching file drivers/staging/media/as102/as10x_cmd.c Works fine, so looks like footer of mailing list IS an issue here (there are less then 3 lines in patch because of end of file). Yes, I confirm removing the footer solves the problem when using 'patch' rather than 'git am'. But then even 'patch' gives up at the subsequent patch: $ patch -p1 -i RESEND-5-14-staging-media-as102-checkpatch-fixes.patch patching file drivers/staging/media/as102/as10x_cmd_stream.c Hunk #3 FAILED at 111. 1 out of 3 hunks FAILED -- saving rejects to file drivers/staging/media/as102/as10x_cmd_stream.c.rej Anyway, thanks for your work, I ended up applying patches 1..3/14, 7..10 (RESEND), and 13..14/14 onto staging/for_v3.2 branch (http://git.linuxtv.org/media_tree.git). The driver works fine then with my PCTV 74e stick. snawrocki@vostro:~/linux/media_tree$ git apply --verbose --reject RESEND-4-14-staging-media-as102-checkpatch-fixes.patch fatal: corrupt patch at line 702 snawrocki@vostro:~/linux/media_tree$ git ll cbcbb4b staging/media/as102: checkpatch fixes acde12d staging/media/as102: checkpatch fixes d47fc51 staging/media/as102: initial import from Abilis ... You are not using git send-email to send the patches, are you ? I'm not using git for sending patches. I have never had any issues with git send-email, and it's quite easy to setup and convenient to use with larger patch series. -- Regards, Sylwester -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/14] staging/media/as102: checkpatch fixes
Patch taken from http://kernellabs.com/hg/~dheitmueller/v4l-dvb-as102-2/ Original source and comment: # HG changeset patch # User Devin Heitmueller dheitmuel...@kernellabs.com # Date 1267318701 18000 # Node ID 69c8f5172790784738bcc18f8301919ef3d5373f # Parent b91e96a07bee27c1d421b4c3702e33ee8075de83 as102: checkpatch fixes From: Devin Heitmueller dheitmuel...@kernellabs.com Fix make checkpatch issues reported against as10x_cmd.c. Priority: normal Signed-off-by: Piotr Chmura chmoor...@poczta.onet.pl Cc: Devin Heitmueller dheitmuel...@kernellabs.com diff --git linux/drivers/staging/media/as102/as10x_cmd.c linuxb/drivers/media/dvb/as102/as10x_cmd.c --- linux/drivers/staging/media/as102/as10x_cmd.c +++ linuxb/drivers/staging/media/as102/as10x_cmd.c @@ -1,6 +1,7 @@ /* * Abilis Systems Single DVB-T Receiver * Copyright (C) 2008 Pierrick Hascoet pierrick.hasc...@abilis.com + * Copyright (C) 2010 Devin Heitmueller dheitmuel...@kernellabs.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +22,8 @@ #include linux/kernel.h #include as102_drv.h #elif defined(WIN32) - #if defined(__BUILDMACHINE__) (__BUILDMACHINE__ == WinDDK) /* win32 ddk implementation */ + #if defined(__BUILDMACHINE__) (__BUILDMACHINE__ == WinDDK) + /* win32 ddk implementation */ #include wdm.h #include Device.h #include endian_mgmt.h /* FIXME */ @@ -51,43 +53,42 @@ */ int as10x_cmd_turn_on(as10x_handle_t *phandle) { - int error; - struct as10x_cmd_t *pcmd, *prsp; + int error; + struct as10x_cmd_t *pcmd, *prsp; - ENTER(); + ENTER(); - pcmd = phandle-cmd; - prsp = phandle-rsp; + pcmd = phandle-cmd; + prsp = phandle-rsp; - /* prepare command */ - as10x_cmd_build(pcmd,(++phandle-cmd_xid), sizeof(pcmd-body.turn_on.req)); + /* prepare command */ + as10x_cmd_build(pcmd, (++phandle-cmd_xid), + sizeof(pcmd-body.turn_on.req)); - /* fill command */ - pcmd-body.turn_on.req.proc_id = cpu_to_le16(CONTROL_PROC_TURNON); + /* fill command */ + pcmd-body.turn_on.req.proc_id = cpu_to_le16(CONTROL_PROC_TURNON); - /* send command */ - if(phandle-ops-xfer_cmd) { - error = phandle-ops-xfer_cmd( - phandle, - (uint8_t *) pcmd, - sizeof(pcmd-body.turn_on.req) + HEADER_SIZE, - (uint8_t *) prsp, - sizeof(prsp-body.turn_on.rsp) + HEADER_SIZE); - } - else{ - error = AS10X_CMD_ERROR; - } + /* send command */ + if (phandle-ops-xfer_cmd) { + error = phandle-ops-xfer_cmd(phandle, (uint8_t *) pcmd, + sizeof(pcmd-body.turn_on.req) + + HEADER_SIZE, + (uint8_t *) prsp, + sizeof(prsp-body.turn_on.rsp) + + HEADER_SIZE); + } else { + error = AS10X_CMD_ERROR; + } - if(error 0) { - goto out; - } + if (error 0) + goto out; - /* parse response */ - error = as10x_rsp_parse(prsp, CONTROL_PROC_TURNON_RSP); + /* parse response */ + error = as10x_rsp_parse(prsp, CONTROL_PROC_TURNON_RSP); out: - LEAVE(); - return(error); + LEAVE(); + return error; } /** @@ -98,42 +99,41 @@ */ int as10x_cmd_turn_off(as10x_handle_t *phandle) { - int error; - struct as10x_cmd_t *pcmd, *prsp; + int error; + struct as10x_cmd_t *pcmd, *prsp; - ENTER(); + ENTER(); - pcmd = phandle-cmd; - prsp = phandle-rsp; + pcmd = phandle-cmd; + prsp = phandle-rsp; - /* prepare command */ - as10x_cmd_build(pcmd,(++phandle-cmd_xid),sizeof(pcmd-body.turn_off.req)); + /* prepare command */ + as10x_cmd_build(pcmd, (++phandle-cmd_xid), + sizeof(pcmd-body.turn_off.req)); - /* fill command */ - pcmd-body.turn_off.req.proc_id = cpu_to_le16(CONTROL_PROC_TURNOFF); + /* fill command */ + pcmd-body.turn_off.req.proc_id = cpu_to_le16(CONTROL_PROC_TURNOFF); - /* send command */ - if(phandle-ops-xfer_cmd) { - error = phandle-ops-xfer_cmd( + /* send command */ + if (phandle-ops-xfer_cmd) { + error = phandle-ops-xfer_cmd( phandle, (uint8_t *) pcmd, sizeof(pcmd-body.turn_off.req) + HEADER_SIZE, -(uint8_t *) prsp, + (uint8_t *) prsp, sizeof(prsp-body.turn_off.rsp) + HEADER_SIZE); - } - else{ - error = AS10X_CMD_ERROR; - } + } else { + error = AS10X_CMD_ERROR; + } - if(error 0) { - goto out; - } + if (error 0)
[RESEND PATCH 4/14] staging/media/as102: checkpatch fixes
Patch taken from http://kernellabs.com/hg/~dheitmueller/v4l-dvb-as102-2/ Original source and comment: # HG changeset patch # User Devin Heitmueller dheitmuel...@kernellabs.com # Date 1267318701 18000 # Node ID 69c8f5172790784738bcc18f8301919ef3d5373f # Parent b91e96a07bee27c1d421b4c3702e33ee8075de83 as102: checkpatch fixes From: Devin Heitmueller dheitmuel...@kernellabs.com Fix make checkpatch issues reported against as10x_cmd.c. Priority: normal Signed-off-by: Devin Heitmueller dheitmuel...@kernellabs.com Signed-off-by: Piotr Chmura chmoor...@poczta.onet.pl diff --git linux/drivers/staging/media/as102/as10x_cmd.c linuxb/drivers/media/dvb/as102/as10x_cmd.c --- linux/drivers/staging/media/as102/as10x_cmd.c +++ linuxb/drivers/staging/media/as102/as10x_cmd.c @@ -1,6 +1,7 @@ /* * Abilis Systems Single DVB-T Receiver * Copyright (C) 2008 Pierrick Hascoet pierrick.hasc...@abilis.com + * Copyright (C) 2010 Devin Heitmueller dheitmuel...@kernellabs.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +22,8 @@ #include linux/kernel.h #include as102_drv.h #elif defined(WIN32) - #if defined(__BUILDMACHINE__) (__BUILDMACHINE__ == WinDDK) /* win32 ddk implementation */ + #if defined(__BUILDMACHINE__) (__BUILDMACHINE__ == WinDDK) + /* win32 ddk implementation */ #include wdm.h #include Device.h #include endian_mgmt.h /* FIXME */ @@ -51,43 +53,42 @@ */ int as10x_cmd_turn_on(as10x_handle_t *phandle) { - int error; - struct as10x_cmd_t *pcmd, *prsp; + int error; + struct as10x_cmd_t *pcmd, *prsp; - ENTER(); + ENTER(); - pcmd = phandle-cmd; - prsp = phandle-rsp; + pcmd = phandle-cmd; + prsp = phandle-rsp; - /* prepare command */ - as10x_cmd_build(pcmd,(++phandle-cmd_xid), sizeof(pcmd-body.turn_on.req)); + /* prepare command */ + as10x_cmd_build(pcmd, (++phandle-cmd_xid), + sizeof(pcmd-body.turn_on.req)); - /* fill command */ - pcmd-body.turn_on.req.proc_id = cpu_to_le16(CONTROL_PROC_TURNON); + /* fill command */ + pcmd-body.turn_on.req.proc_id = cpu_to_le16(CONTROL_PROC_TURNON); - /* send command */ - if(phandle-ops-xfer_cmd) { - error = phandle-ops-xfer_cmd( - phandle, - (uint8_t *) pcmd, - sizeof(pcmd-body.turn_on.req) + HEADER_SIZE, - (uint8_t *) prsp, - sizeof(prsp-body.turn_on.rsp) + HEADER_SIZE); - } - else{ - error = AS10X_CMD_ERROR; - } + /* send command */ + if (phandle-ops-xfer_cmd) { + error = phandle-ops-xfer_cmd(phandle, (uint8_t *) pcmd, + sizeof(pcmd-body.turn_on.req) + + HEADER_SIZE, + (uint8_t *) prsp, + sizeof(prsp-body.turn_on.rsp) + + HEADER_SIZE); + } else { + error = AS10X_CMD_ERROR; + } - if(error 0) { - goto out; - } + if (error 0) + goto out; - /* parse response */ - error = as10x_rsp_parse(prsp, CONTROL_PROC_TURNON_RSP); + /* parse response */ + error = as10x_rsp_parse(prsp, CONTROL_PROC_TURNON_RSP); out: - LEAVE(); - return(error); + LEAVE(); + return error; } /** @@ -98,42 +99,41 @@ */ int as10x_cmd_turn_off(as10x_handle_t *phandle) { - int error; - struct as10x_cmd_t *pcmd, *prsp; + int error; + struct as10x_cmd_t *pcmd, *prsp; - ENTER(); + ENTER(); - pcmd = phandle-cmd; - prsp = phandle-rsp; + pcmd = phandle-cmd; + prsp = phandle-rsp; - /* prepare command */ - as10x_cmd_build(pcmd,(++phandle-cmd_xid),sizeof(pcmd-body.turn_off.req)); + /* prepare command */ + as10x_cmd_build(pcmd, (++phandle-cmd_xid), + sizeof(pcmd-body.turn_off.req)); - /* fill command */ - pcmd-body.turn_off.req.proc_id = cpu_to_le16(CONTROL_PROC_TURNOFF); + /* fill command */ + pcmd-body.turn_off.req.proc_id = cpu_to_le16(CONTROL_PROC_TURNOFF); - /* send command */ - if(phandle-ops-xfer_cmd) { - error = phandle-ops-xfer_cmd( + /* send command */ + if (phandle-ops-xfer_cmd) { + error = phandle-ops-xfer_cmd( phandle, (uint8_t *) pcmd, sizeof(pcmd-body.turn_off.req) + HEADER_SIZE, -(uint8_t *) prsp, + (uint8_t *) prsp, sizeof(prsp-body.turn_off.rsp) + HEADER_SIZE); - } - else{ - error = AS10X_CMD_ERROR; - } + } else { + error = AS10X_CMD_ERROR; + } - if(error 0) { - goto out; - } + if