Re: [PATCH 19/20] target: Fix several format specifiers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/13/21 12:07 PM, Bart Van Assche wrote:
> Use format specifier '%u' to format the u32 and int data types instead of
> '%hu'.
> 
> Cc: Mike Christie <michael.christie@xxxxxxxxxx>
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> ---
>  drivers/target/target_core_configfs.c | 6 +++---
>  drivers/target/target_core_pr.c       | 6 ++----
>  2 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
> index 9cb1ca8421c8..01005a9e5128 100644
> --- a/drivers/target/target_core_configfs.c
> +++ b/drivers/target/target_core_configfs.c
> @@ -2746,7 +2746,7 @@ static ssize_t target_tg_pt_gp_alua_access_state_store(struct config_item *item,
>  
>  	if (!tg_pt_gp->tg_pt_gp_valid_id) {
>  		pr_err("Unable to do implicit ALUA on non valid"
> -			" tg_pt_gp ID: %hu\n", tg_pt_gp->tg_pt_gp_valid_id);
> +			" tg_pt_gp ID: %u\n", tg_pt_gp->tg_pt_gp_valid_id);
>  		return -EINVAL;
>  	}
>  	if (!target_dev_configured(dev)) {
> @@ -2798,7 +2798,7 @@ static ssize_t target_tg_pt_gp_alua_access_status_store(
>  
>  	if (!tg_pt_gp->tg_pt_gp_valid_id) {
>  		pr_err("Unable to do set ALUA access status on non"
> -			" valid tg_pt_gp ID: %hu\n",
> +			" valid tg_pt_gp ID: %u\n",
>  			tg_pt_gp->tg_pt_gp_valid_id);
>  		return -EINVAL;
>  	}
> @@ -2853,7 +2853,7 @@ static ssize_t target_tg_pt_gp_alua_support_##_name##_store(		\
>  									\
>  	if (!t->tg_pt_gp_valid_id) {					\
>  		pr_err("Unable to do set " #_name " ALUA state on non"	\
> -		       " valid tg_pt_gp ID: %hu\n",			\
> +		       " valid tg_pt_gp ID: %u\n",			\

Did you just want to drop the tg_pt_gp_valid_id from the messages above?
Instead make the messages stop at non valid tg_pt_gp. Like for the first one:

Unable to do implicit ALUA on non valid tg_pt_gp ID.

It looks like we might have used to print the actual id. That's why we did
the hu and the message looks like we are printing the id "tg_pt_gp ID:".
We are now printing just 0 or 1 but it looks like an id value in the message.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux