linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: not need to alloc zero buffer for local_atto_ioctl
@ 2016-08-21  2:33 Shawn Lin
  2016-08-25 18:45 ` Bradley Grove
  2016-08-26  2:29 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Shawn Lin @ 2016-08-21  2:33 UTC (permalink / raw)
  To: Bradley Grove, jejb, Martin K. Petersen
  Cc: linux-scsi, linux-kernel, Shawn Lin

We don't need to use kzalloc as we will always memset the
local_atto_ioctl later.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/scsi/esas2r/esas2r_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c
index 2aca4d1..5092c82 100644
--- a/drivers/scsi/esas2r/esas2r_main.c
+++ b/drivers/scsi/esas2r/esas2r_main.c
@@ -194,7 +194,7 @@ static ssize_t write_hw(struct file *file, struct kobject *kobj,
 	int length = min(sizeof(struct atto_ioctl), count);
 
 	if (!a->local_atto_ioctl) {
-		a->local_atto_ioctl = kzalloc(sizeof(struct atto_ioctl),
+		a->local_atto_ioctl = kmalloc(sizeof(struct atto_ioctl),
 					      GFP_KERNEL);
 		if (a->local_atto_ioctl == NULL) {
 			esas2r_log(ESAS2R_LOG_WARN,
-- 
2.3.7

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: not need to alloc zero buffer for local_atto_ioctl
  2016-08-21  2:33 [PATCH] scsi: not need to alloc zero buffer for local_atto_ioctl Shawn Lin
@ 2016-08-25 18:45 ` Bradley Grove
  2016-08-26  2:29 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Bradley Grove @ 2016-08-25 18:45 UTC (permalink / raw)
  To: Shawn Lin, Bradley Grove, jejb, Martin K. Petersen
  Cc: linux-scsi, linux-kernel

Acked-by: Bradley Grove <bgrove@attotech.com>

On 08/20/2016 10:33 PM, Shawn Lin wrote:
> We don't need to use kzalloc as we will always memset the
> local_atto_ioctl later.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
> ---
>
>  drivers/scsi/esas2r/esas2r_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c
> index 2aca4d1..5092c82 100644
> --- a/drivers/scsi/esas2r/esas2r_main.c
> +++ b/drivers/scsi/esas2r/esas2r_main.c
> @@ -194,7 +194,7 @@ static ssize_t write_hw(struct file *file, struct kobject *kobj,
>  	int length = min(sizeof(struct atto_ioctl), count);
>
>  	if (!a->local_atto_ioctl) {
> -		a->local_atto_ioctl = kzalloc(sizeof(struct atto_ioctl),
> +		a->local_atto_ioctl = kmalloc(sizeof(struct atto_ioctl),
>  					      GFP_KERNEL);
>  		if (a->local_atto_ioctl == NULL) {
>  			esas2r_log(ESAS2R_LOG_WARN,
>



This electronic transmission and any attachments hereto are intended only for the use of the individual or entity to which it is addressed and may contain confidential information belonging to ATTO Technology, Inc. If you have reason to believe that you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this electronic transmission is strictly prohibited. If you have reason to believe that you have received this transmission in error, please notify ATTO immediately by return e-mail and delete and destroy this communication.   

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: not need to alloc zero buffer for local_atto_ioctl
  2016-08-21  2:33 [PATCH] scsi: not need to alloc zero buffer for local_atto_ioctl Shawn Lin
  2016-08-25 18:45 ` Bradley Grove
@ 2016-08-26  2:29 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-08-26  2:29 UTC (permalink / raw)
  To: Shawn Lin
  Cc: Bradley Grove, jejb, Martin K. Petersen, linux-scsi, linux-kernel

>>>>> "Shawn" == Shawn Lin <shawn.lin@rock-chips.com> writes:

Shawn> We don't need to use kzalloc as we will always memset the
Shawn> local_atto_ioctl later.

Applied to 4.9/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-26  2:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-21  2:33 [PATCH] scsi: not need to alloc zero buffer for local_atto_ioctl Shawn Lin
2016-08-25 18:45 ` Bradley Grove
2016-08-26  2:29 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).