Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1329815
| From | Shaun Ren <shaun.ren@linux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 2/9] Staging: rts5208: rtsx_transport.c: Align to open parenthesis |
| Date | 2016-02-09 02:40 +0100 |
| Message-ID | <r05rA-5cr-7@gated-at.bofh.it> (permalink) |
| References | <qV1yi-4Nn-5@gated-at.bofh.it> <r05rA-5cr-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This patch fixes the alignment issue reported by checkpatch.pl:
CHECK: Alignment should match open parenthesis
Signed-off-by: Shaun Ren <shaun.ren@linux.com>
---
drivers/staging/rts5208/rtsx_transport.c | 61 ++++++++++++++++++--------------
1 file changed, 35 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
index 3e3f6fb..67162f6 100644
--- a/drivers/staging/rts5208/rtsx_transport.c
+++ b/drivers/staging/rts5208/rtsx_transport.c
@@ -40,8 +40,11 @@
*/
unsigned int rtsx_stor_access_xfer_buf(unsigned char *buffer,
- unsigned int buflen, struct scsi_cmnd *srb, unsigned int *index,
- unsigned int *offset, enum xfer_buf_dir dir)
+ unsigned int buflen,
+ struct scsi_cmnd *srb,
+ unsigned int *index,
+ unsigned int *offset,
+ enum xfer_buf_dir dir)
{
unsigned int cnt;
@@ -54,10 +57,10 @@ unsigned int rtsx_stor_access_xfer_buf(unsigned char *buffer,
cnt = min(buflen, scsi_bufflen(srb) - *offset);
if (dir == TO_XFER_BUF)
memcpy((unsigned char *) scsi_sglist(srb) + *offset,
- buffer, cnt);
+ buffer, cnt);
else
memcpy(buffer, (unsigned char *) scsi_sglist(srb) +
- *offset, cnt);
+ *offset, cnt);
*offset += cnt;
/* Using scatter-gather. We have to go through the list one entry
@@ -131,7 +134,7 @@ unsigned int rtsx_stor_access_xfer_buf(unsigned char *buffer,
* SCSI residue.
*/
void rtsx_stor_set_xfer_buf(unsigned char *buffer,
- unsigned int buflen, struct scsi_cmnd *srb)
+ unsigned int buflen, struct scsi_cmnd *srb)
{
unsigned int index = 0, offset = 0;
@@ -142,7 +145,7 @@ void rtsx_stor_set_xfer_buf(unsigned char *buffer,
}
void rtsx_stor_get_xfer_buf(unsigned char *buffer,
- unsigned int buflen, struct scsi_cmnd *srb)
+ unsigned int buflen, struct scsi_cmnd *srb)
{
unsigned int index = 0, offset = 0;
@@ -194,8 +197,8 @@ void rtsx_invoke_transport(struct scsi_cmnd *srb, struct rtsx_chip *chip)
/* set the result so the higher layers expect this data */
srb->result = SAM_STAT_CHECK_CONDITION;
memcpy(srb->sense_buffer,
- (unsigned char *)&(chip->sense_buffer[SCSI_LUN(srb)]),
- sizeof(struct sense_data_t));
+ (unsigned char *)&(chip->sense_buffer[SCSI_LUN(srb)]),
+ sizeof(struct sense_data_t));
}
return;
@@ -209,7 +212,7 @@ Handle_Errors:
}
void rtsx_add_cmd(struct rtsx_chip *chip,
- u8 cmd_type, u16 reg_addr, u8 mask, u8 data)
+ u8 cmd_type, u16 reg_addr, u8 mask, u8 data)
{
u32 *cb = (u32 *)(chip->host_cmds_ptr);
u32 val = 0;
@@ -328,9 +331,11 @@ static inline void rtsx_add_sg_tbl(
}
static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card,
- struct scatterlist *sg, int num_sg, unsigned int *index,
- unsigned int *offset, int size,
- enum dma_data_direction dma_dir, int timeout)
+ struct scatterlist *sg, int num_sg,
+ unsigned int *index,
+ unsigned int *offset, int size,
+ enum dma_data_direction dma_dir,
+ int timeout)
{
struct rtsx_dev *rtsx = chip->rtsx;
struct completion trans_done;
@@ -492,8 +497,9 @@ out:
}
static int rtsx_transfer_sglist_adma(struct rtsx_chip *chip, u8 card,
- struct scatterlist *sg, int num_sg,
- enum dma_data_direction dma_dir, int timeout)
+ struct scatterlist *sg, int num_sg,
+ enum dma_data_direction dma_dir,
+ int timeout)
{
struct rtsx_dev *rtsx = chip->rtsx;
struct completion trans_done;
@@ -639,7 +645,8 @@ out:
}
static int rtsx_transfer_buf(struct rtsx_chip *chip, u8 card, void *buf,
- size_t len, enum dma_data_direction dma_dir, int timeout)
+ size_t len, enum dma_data_direction dma_dir,
+ int timeout)
{
struct rtsx_dev *rtsx = chip->rtsx;
struct completion trans_done;
@@ -722,9 +729,9 @@ out:
}
int rtsx_transfer_data_partial(struct rtsx_chip *chip, u8 card,
- void *buf, size_t len, int use_sg, unsigned int *index,
- unsigned int *offset, enum dma_data_direction dma_dir,
- int timeout)
+ void *buf, size_t len, int use_sg,
+ unsigned int *index, unsigned int *offset,
+ enum dma_data_direction dma_dir, int timeout)
{
int err = 0;
@@ -732,11 +739,13 @@ int rtsx_transfer_data_partial(struct rtsx_chip *chip, u8 card,
if (rtsx_chk_stat(chip, RTSX_STAT_ABORT))
return -EIO;
- if (use_sg)
- err = rtsx_transfer_sglist_adma_partial(chip, card,
- (struct scatterlist *)buf, use_sg,
- index, offset, (int)len, dma_dir, timeout);
- else
+ if (use_sg) {
+ struct scatterlist *sg = (struct scatterlist *)buf;
+
+ err = rtsx_transfer_sglist_adma_partial(chip, card, sg, use_sg,
+ index, offset, (int)len,
+ dma_dir, timeout);
+ } else
err = rtsx_transfer_buf(chip, card,
buf, len, dma_dir, timeout);
if (err < 0) {
@@ -751,7 +760,7 @@ int rtsx_transfer_data_partial(struct rtsx_chip *chip, u8 card,
}
int rtsx_transfer_data(struct rtsx_chip *chip, u8 card, void *buf, size_t len,
- int use_sg, enum dma_data_direction dma_dir, int timeout)
+ int use_sg, enum dma_data_direction dma_dir, int timeout)
{
int err = 0;
@@ -763,8 +772,8 @@ int rtsx_transfer_data(struct rtsx_chip *chip, u8 card, void *buf, size_t len,
if (use_sg) {
err = rtsx_transfer_sglist_adma(chip, card,
- (struct scatterlist *)buf,
- use_sg, dma_dir, timeout);
+ (struct scatterlist *)buf,
+ use_sg, dma_dir, timeout);
} else {
err = rtsx_transfer_buf(chip, card, buf, len, dma_dir, timeout);
}
--
2.7.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/9] Staging: rts5208: Coding style and dma mapping fixes Shaun Ren <shaun.ren@linux.com> - 2016-02-09 02:40 +0100
[PATCH v2 2/9] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren <shaun.ren@linux.com> - 2016-02-09 02:40 +0100
Re: [PATCH v2 2/9] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-02-10 06:30 +0100
[PATCH v2 7/9] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Shaun Ren <shaun.ren@linux.com> - 2016-02-09 02:40 +0100
Re: [PATCH v2 7/9] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-02-10 06:30 +0100
Re: [PATCH v2 7/9] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Shaun Ren <shaun.ren@linux.com> - 2016-02-10 19:40 +0100
[PATCH v2 3/9] Staging: rts5208: rtsx_transport.c: Remove spaces after casts Shaun Ren <shaun.ren@linux.com> - 2016-02-09 02:40 +0100
[PATCH v2 5/9] Staging: rts5208: rtsx_transport.c: Remove extra newlines Shaun Ren <shaun.ren@linux.com> - 2016-02-09 02:40 +0100
[PATCH v2 9/9] Staging: rts5208: Add missing dma_mapping_error Shaun Ren <shaun.ren@linux.com> - 2016-02-09 02:40 +0100
[PATCH v2 6/9] Staging: rts5208: rtsx_transport.c: Fix label naming convention Shaun Ren <shaun.ren@linux.com> - 2016-02-09 02:40 +0100
[PATCH v2 1/9] Staging: rts5208: rtsx_transport.c: Fix comment style warnings Shaun Ren <shaun.ren@linux.com> - 2016-02-09 02:40 +0100
Re: [PATCH v2 1/9] Staging: rts5208: rtsx_transport.c: Fix comment style warnings Joshua Clayton <stillcompiling@gmail.com> - 2016-02-09 04:10 +0100
[PATCH v2 8/9] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL Shaun Ren <shaun.ren@linux.com> - 2016-02-09 02:40 +0100
[PATCH v2 4/9] Staging: rts5208: rtsx_transport.c: Add spaces around - Shaun Ren <shaun.ren@linux.com> - 2016-02-09 02:40 +0100
[PATCH v3 3/9] Staging: rts5208: rtsx_transport.c: Remove spaces after casts Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v3 6/9] Staging: rts5208: rtsx_transport.c: Fix label naming convention Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v3 0/9] Staging: rts5208: Coding style and dma mapping fixes Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v3 8/9] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v3 5/9] Staging: rts5208: rtsx_transport.c: Remove extra newlines Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v3 2/9] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
Re: [PATCH v3 2/9] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Joe Perches <joe@perches.com> - 2016-02-10 04:00 +0100
[PATCH v3 1/9] Staging: rts5208: rtsx_transport.c: Cleanup comments Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
Re: [PATCH v3 1/9] Staging: rts5208: rtsx_transport.c: Cleanup comments Joshua Clayton <stillcompiling@gmail.com> - 2016-02-10 04:30 +0100
[PATCH v3 7/9] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v3 4/9] Staging: rts5208: rtsx_transport.c: Add spaces around - Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v3 9/9] Staging: rts5208: Add missing dma_mapping_error Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v4 7/8] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 4/8] Staging: rts5208: rtsx_transport.c: Add spaces around - Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 6/8] Staging: rts5208: rtsx_transport.c: Fix label naming convention Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 0/8] Staging: rts5208: Fix coding style Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 1/8] Staging: rts5208: rtsx_transport.c: Cleanup comments Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 8/8] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 2/8] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
Re: [PATCH v4 2/8] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Joe Perches <joe@perches.com> - 2016-02-12 05:40 +0100
[PATCH v5 2/8] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren <shaun.ren@linux.com> - 2016-02-12 08:00 +0100
Re: [PATCH v5 2/8] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Greg KH <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH v4 3/8] Staging: rts5208: rtsx_transport.c: Remove spaces after casts Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 5/8] Staging: rts5208: rtsx_transport.c: Remove extra newlines Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v5 RESEND 3/8] Staging: rts5208: rtsx_transport.c: Remove spaces after casts Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:00 +0100
[PATCH v5 RESEND 7/8] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:00 +0100
[PATCH v5 RESEND 6/8] Staging: rts5208: rtsx_transport.c: Fix label naming convention Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:00 +0100
[PATCH v5 RESEND 8/8] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:00 +0100
[PATCH v5 RESEND 0/8] Staging: rts5208: Fix coding style Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:00 +0100
[PATCH v5 RESEND 1/8] Staging: rts5208: rtsx_transport.c: Cleanup comments Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:00 +0100
[PATCH v5 RESEND 4/8] Staging: rts5208: rtsx_transport.c: Add spaces around - Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:10 +0100
[PATCH v5 RESEND 5/8] Staging: rts5208: rtsx_transport.c: Remove extra newlines Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:10 +0100
[PATCH v5 RESEND 2/8] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:10 +0100
csiph-web