lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 03 Mar 2023 14:10:04 +0100
From:   Harald Freudenberger <freude@...ux.ibm.com>
To:     Yu Zhe <yuzhe@...china.com>
Cc:     hca@...ux.ibm.com, gor@...ux.ibm.com, agordeev@...ux.ibm.com,
        borntraeger@...ux.ibm.com, svens@...ux.ibm.com,
        linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org, liqiong@...china.com
Subject: Re: [PATCH v3] s390/zcrypt: remove unnecessary (void*) conversions

On 2023-03-03 06:21, Yu Zhe wrote:
> Pointer variables of void * type do not require type cast.
> 
> Signed-off-by: Yu Zhe <yuzhe@...china.com>
> ---
>  drivers/s390/crypto/zcrypt_msgtype6.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/s390/crypto/zcrypt_msgtype6.c
> b/drivers/s390/crypto/zcrypt_msgtype6.c
> index 5ad251477593..a2e7fe33ba62 100644
> --- a/drivers/s390/crypto/zcrypt_msgtype6.c
> +++ b/drivers/s390/crypto/zcrypt_msgtype6.c
> @@ -926,8 +926,7 @@ static void zcrypt_msgtype6_receive(struct ap_queue 
> *aq,
>  		.type = TYPE82_RSP_CODE,
>  		.reply_code = REP82_ERROR_MACHINE_FAILURE,
>  	};
> -	struct response_type *resp_type =
> -		(struct response_type *)msg->private;
> +	struct response_type *resp_type = msg->private;
>  	struct type86x_reply *t86r;
>  	int len;
> 
> @@ -982,8 +981,7 @@ static void zcrypt_msgtype6_receive_ep11(struct
> ap_queue *aq,
>  		.type = TYPE82_RSP_CODE,
>  		.reply_code = REP82_ERROR_MACHINE_FAILURE,
>  	};
> -	struct response_type *resp_type =
> -		(struct response_type *)msg->private;
> +	struct response_type *resp_type = msg->private;
>  	struct type86_ep11_reply *t86r;
>  	int len;
> 
> @@ -1157,7 +1155,7 @@ static long zcrypt_msgtype6_send_cprb(bool
> userspace, struct zcrypt_queue *zq,
>  				      struct ap_message *ap_msg)
>  {
>  	int rc;
> -	struct response_type *rtype = (struct response_type 
> *)(ap_msg->private);
> +	struct response_type *rtype = ap_msg->private;
>  	struct {
>  		struct type6_hdr hdr;
>  		struct CPRBX cprbx;
> @@ -1240,7 +1238,7 @@ static long zcrypt_msgtype6_send_ep11_cprb(bool
> userspace, struct zcrypt_queue *
>  {
>  	int rc;
>  	unsigned int lfmt;
> -	struct response_type *rtype = (struct response_type 
> *)(ap_msg->private);
> +	struct response_type *rtype = ap_msg->private;
>  	struct {
>  		struct type6_hdr hdr;
>  		struct ep11_cprb cprbx;
> @@ -1359,7 +1357,7 @@ static long zcrypt_msgtype6_rng(struct 
> zcrypt_queue *zq,
>  		short int verb_length;
>  		short int key_length;
>  	} __packed * msg = ap_msg->msg;
> -	struct response_type *rtype = (struct response_type 
> *)(ap_msg->private);
> +	struct response_type *rtype = ap_msg->private;
>  	int rc;
> 
>  	msg->cprbx.domain = AP_QID_QUEUE(zq->queue->qid);

Thanks for this patch and the reviews done. As maintainer of the zcrypt 
and ap bus
code I will of course also review the patch, pick it and apply it to our 
internal
s390 subsystem kernel repository. On the next synch it will appear in 
Linus Torwald's
kernel tree. Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ