From 2e54bbc54e56ba0202bb7183e8bbad0cbf2f6d43 Mon Sep 17 00:00:00 2001 From: vlnb Date: Mon, 2 Feb 2009 16:25:47 +0000 Subject: [PATCH] In the header file scst.h scst_cmd::sg_cnt and tgt_sg_cnt::sg_cnt are declared as signed integers, while some inline functions in the same header file treat these as unsigned integers. The patch below converts all uses to signed integer. The patch below has been verified by checking the output files generated by the following command: scripts/run-regression-tests -k 2.6.24.7 -k 2.6.25.20 -k 2.6.26.8 -k 2.6.27.13 -k 2.6.28.2 Note: I do not expect that this patch changes the behavior of SCST in any way. This patch is not a bug fix -- all it does is cleaning up an inconsistency. Signed-off-by: Bart Van Assche git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@659 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index e2cd7d6..9227377 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -2098,7 +2098,7 @@ static inline struct scatterlist *scst_cmd_get_sg(struct scst_cmd *cmd) * Usage of this function is not recommended, use scst_get_buf_*() * family of functions instead. */ -static inline unsigned int scst_cmd_get_sg_cnt(struct scst_cmd *cmd) +static inline int scst_cmd_get_sg_cnt(struct scst_cmd *cmd) { return cmd->sg_cnt; } @@ -2122,14 +2122,14 @@ static inline struct scatterlist *scst_cmd_get_tgt_sg(struct scst_cmd *cmd) } /* Returns cmd's target's sg_cnt */ -static inline unsigned int scst_cmd_get_tgt_sg_cnt(struct scst_cmd *cmd) +static inline int scst_cmd_get_tgt_sg_cnt(struct scst_cmd *cmd) { return cmd->tgt_sg_cnt; } /* Sets cmd's target's SG data buffer */ static inline void scst_cmd_set_tgt_sg(struct scst_cmd *cmd, - struct scatterlist *sg, unsigned int sg_cnt) + struct scatterlist *sg, int sg_cnt) { cmd->tgt_sg = sg; cmd->tgt_sg_cnt = sg_cnt; -- 2.17.1