The patch below fixes the following classes of checkpatch errors:

* ERROR: return is not a function, parentheses are not required
* ERROR: that open brace { should be on the previous line

This patch has been tested by verifying that the newly generated patch still
applies without warnings to the 2.6.25.17 kernel and that the patched kernel
still compiles.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@512 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2008-10-06 17:18:04 +00:00
parent eb7c33a0b0
commit 7b02f74ee0
4 changed files with 13 additions and 14 deletions

View File

@@ -518,7 +518,7 @@ static inline int test_write_ready(struct iscsi_conn *conn)
* No need for write_list protection, in the worst case we will be
* restarted again.
*/
return (!list_empty(&conn->write_list) || conn->write_cmnd);
return !list_empty(&conn->write_list) || conn->write_cmnd;
}
static inline void conn_get(struct iscsi_conn *conn)

View File

@@ -515,7 +515,7 @@ struct iscsi_nop_in_hdr {
#define cmnd_ttt(cmnd) cpu_to_be32((cmnd)->pdu.bhs.ttt)
#define cmnd_itt(cmnd) cpu_to_be32((cmnd)->pdu.bhs.itt)
#define cmnd_opcode(cmnd) ((cmnd)->pdu.bhs.opcode & ISCSI_OPCODE_MASK)
#define cmnd_scsicode(cmnd) cmnd_hdr(cmnd)->scb[0]
#define cmnd_scsicode(cmnd) (cmnd_hdr((cmnd))->scb[0])
#endif /* __ISCSI_HDR_H__ */

View File

@@ -432,12 +432,11 @@ static int vdisk_attach(struct scst_device *dev)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
if ((fd->f_op == NULL) || (fd->f_op->readv == NULL) ||
(fd->f_op->writev == NULL))
(fd->f_op->writev == NULL)) {
#else
if ((fd->f_op == NULL) || (fd->f_op->aio_read == NULL) ||
(fd->f_op->aio_write == NULL))
(fd->f_op->aio_write == NULL)) {
#endif
{
PRINT_ERROR("%s", "Wrong f_op or FS doesn't have "
"required capabilities");
res = -EINVAL;

View File

@@ -408,19 +408,19 @@ void scst_process_reset(struct scst_device *dev,
static inline int scst_is_ua_command(struct scst_cmd *cmd)
{
return ((cmd->cdb[0] != INQUIRY) &&
(cmd->cdb[0] != REQUEST_SENSE) &&
(cmd->cdb[0] != REPORT_LUNS));
return cmd->cdb[0] != INQUIRY
&& cmd->cdb[0] != REQUEST_SENSE
&& cmd->cdb[0] != REPORT_LUNS;
}
static inline int scst_is_implicit_hq(struct scst_cmd *cmd)
{
return ((cmd->cdb[0] == INQUIRY) ||
(cmd->cdb[0] == REPORT_LUNS) ||
((cmd->dev->type == TYPE_DISK) &&
((cmd->cdb[0] == READ_CAPACITY) ||
((cmd->cdb[0] == SERVICE_ACTION_IN) &&
((cmd->cdb[1] & 0x1f) == SAI_READ_CAPACITY_16)))));
return cmd->cdb[0] == INQUIRY
|| cmd->cdb[0] == REPORT_LUNS
|| (cmd->dev->type == TYPE_DISK
&& (cmd->cdb[0] == READ_CAPACITY
|| (cmd->cdb[0] == SERVICE_ACTION_IN
&& (cmd->cdb[1] & 0x1f) == SAI_READ_CAPACITY_16)));
}
/*