All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Cc: "jejb@linux.vnet.ibm.com" <jejb@linux.vnet.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Dave Carroll <david.carroll@microsemi.com>,
	Gana Sridaran <gana.sridaran@microsemi.com>,
	Scott Benesh <scott.benesh@microsemi.com>
Subject: Re: [PATCH V3 08/24] aacraid: Added support for response path
Date: Tue, 31 Jan 2017 09:02:52 +0100	[thread overview]
Message-ID: <20170131080252.GA3687@linux-x5ow.site> (raw)
In-Reply-To: <4D8E82A446BF54499747901DBDEB737A7B8A6DA3@avsrvexchmbx2.microsemi.net>

On Mon, Jan 30, 2017 at 08:16:48PM +0000, Raghava Aditya Renukunta wrote:
> 
> 
> > -----Original Message-----
> > From: Johannes Thumshirn [mailto:jthumshirn@suse.de]
> > Sent: Monday, January 30, 2017 1:50 AM
> > To: Raghava Aditya Renukunta
> > <RaghavaAditya.Renukunta@microsemi.com>
> > Cc: jejb@linux.vnet.ibm.com; martin.petersen@oracle.com; linux-
> > scsi@vger.kernel.org; Dave Carroll <david.carroll@microsemi.com>; Gana
> > Sridaran <gana.sridaran@microsemi.com>; Scott Benesh
> > <scott.benesh@microsemi.com>
> > Subject: Re: [PATCH V3 08/24] aacraid: Added support for response path
> > 
> > EXTERNAL EMAIL
> > 
> > 
> > On Fri, Jan 27, 2017 at 11:28:37AM -0800, Raghava Aditya Renukunta wrote:
> > > This patch enables the driver to actually process the I/O, or srb replies
> > > from adapter. In addition to any HBA1000 or SmartIOC2000 adapter events.
> > >
> > > Signed-off-by: Raghava Aditya Renukunta
> > <raghavaaditya.renukunta@microsemi.com>
> > > Signed-off-by: Dave Carroll <David.Carroll@microsemi.com>
> > >
> > > ---
> > 
> > Sorry for not completely reviewing the patchset before you reposted.
> > 
> > > @@ -475,16 +475,26 @@ int aac_get_containers(struct aac_dev *dev)
> > >
> > >       if (maximum_num_containers < MAXIMUM_NUM_CONTAINERS)
> > >               maximum_num_containers = MAXIMUM_NUM_CONTAINERS;
> > > -     fsa_dev_ptr = kzalloc(sizeof(*fsa_dev_ptr) *
> > maximum_num_containers,
> > > -                     GFP_KERNEL);
> > > -     if (!fsa_dev_ptr)
> > > -             return -ENOMEM;
> > > +     if ((dev->fsa_dev == NULL) ||
> > > +             (dev->maximum_num_containers != maximum_num_containers))
> > {
> > > +
> > > +             fsa_dev_ptr = dev->fsa_dev;
> > 
> > Comparison has precedence over logical OR. See
> > http://en.cppreference.com/w/c/language/operator_precedence
> 
> Acknowledged.  , I will remove the parentheses.
> The idea was to make it easier to read the code , if there were enclosed in 
> Parenthesis  (I dabbled a bit in lisp , and for me brackets makes it easier to read).

I think it makes it a bit less obvious and yes it kinda looks like LISP,
you're right.

> 
> > 
> > >
> > > -     dev->fsa_dev = fsa_dev_ptr;
> > > -     dev->maximum_num_containers = maximum_num_containers;
> > > +             dev->fsa_dev = kzalloc(sizeof(*fsa_dev_ptr) *
> > > +                             maximum_num_containers, GFP_KERNEL);
> > 
> > kcalloc()?
> 
> Yes kcalloc makes sense, but then an additional mem set would be required.
> Unless there is a kzcalloc or kczalloc?

No kcalloc() (and it's user-space counterpart calloc() give you zeroed out
memory). If you don't want a zero-fill kmalloc_array() would be the way to go.

Thanks for taking care of that,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  reply	other threads:[~2017-01-31  8:03 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 19:28 [PATCH V3 00/24] aacraid: Patchset for Smart Family Support Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 01/24] aacraid: Remove duplicate irq management code Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 02/24] aacraid: Added aacraid.h include guard Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 03/24] aacraid: added support for init_struct_8 Raghava Aditya Renukunta
2017-01-30  9:15   ` Johannes Thumshirn
2017-01-27 19:28 ` [PATCH V3 04/24] aacraid: Added sa firmware support Raghava Aditya Renukunta
2017-01-30  9:23   ` Johannes Thumshirn
2017-01-27 19:28 ` [PATCH V3 05/24] aacraid: Retrieve and update the device types Raghava Aditya Renukunta
2017-01-30  9:35   ` Johannes Thumshirn
2017-01-27 19:28 ` [PATCH V3 06/24] aacraid: Reworked scsi command submission path Raghava Aditya Renukunta
2017-01-30  9:38   ` Johannes Thumshirn
2017-01-30 20:17     ` Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 07/24] aacraid: Process Error for response I/O Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 08/24] aacraid: Added support for response path Raghava Aditya Renukunta
2017-01-30  9:50   ` Johannes Thumshirn
2017-01-30 20:16     ` Raghava Aditya Renukunta
2017-01-31  8:02       ` Johannes Thumshirn [this message]
2017-01-27 19:28 ` [PATCH V3 09/24] aacraid: Added support for read medium error Raghava Aditya Renukunta
2017-01-30  9:55   ` Johannes Thumshirn
2017-01-27 19:28 ` [PATCH V3 10/24] aacraid: Reworked aac_command_thread Raghava Aditya Renukunta
2017-01-30 10:11   ` Johannes Thumshirn
2017-01-30 20:11     ` Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 11/24] aacraid: Added support for periodic wellness sync Raghava Aditya Renukunta
2017-01-30 10:27   ` Johannes Thumshirn
2017-01-30 20:07     ` Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 12/24] aacraid: Retrieve Queue Depth from Adapter FW Raghava Aditya Renukunta
2017-01-30 10:31   ` Johannes Thumshirn
2017-01-30 20:05     ` Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 13/24] aacraid: Added support to set QD of attached drives Raghava Aditya Renukunta
2017-01-30 10:39   ` Johannes Thumshirn
2017-01-30 20:01     ` Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 14/24] aacraid: Added support for hotplug Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 15/24] aacraid: Include HBA direct interface Raghava Aditya Renukunta
2017-01-30 11:02   ` Johannes Thumshirn
2017-01-30 20:00     ` Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 16/24] aacraid: Add task management functionality Raghava Aditya Renukunta
2017-01-30 11:19   ` Johannes Thumshirn
2017-01-30 19:59     ` Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 17/24] aacraid: Added support to abort cmd and reset lun Raghava Aditya Renukunta
2017-01-30 11:24   ` Johannes Thumshirn
2017-01-27 19:28 ` [PATCH V3 18/24] aacraid: VPD 83 type3 support Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 19/24] aacraid: Added new IWBR reset Raghava Aditya Renukunta
2017-01-30 11:39   ` Johannes Thumshirn
2017-01-30 19:56     ` Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 20/24] aacraid: Added ioctl to trigger IOP/IWBR reset Raghava Aditya Renukunta
2017-01-30 11:41   ` Johannes Thumshirn
2017-01-27 19:28 ` [PATCH V3 21/24] aacraid: Retrieve HBA host information ioctl Raghava Aditya Renukunta
2017-01-30 11:43   ` Johannes Thumshirn
2017-01-30 19:53     ` Raghava Aditya Renukunta
2017-01-27 19:28 ` [PATCH V3 22/24] aacraid: Update copyrights Raghava Aditya Renukunta
2017-01-30 11:43   ` Johannes Thumshirn
2017-01-27 19:28 ` [PATCH V3 23/24] aacraid: Change Driver Version Prefix Raghava Aditya Renukunta
2017-01-30 11:44   ` Johannes Thumshirn
2017-01-27 19:28 ` [PATCH V3 24/24] aacraid: update version Raghava Aditya Renukunta
2017-01-30 11:44   ` Johannes Thumshirn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170131080252.GA3687@linux-x5ow.site \
    --to=jthumshirn@suse.de \
    --cc=RaghavaAditya.Renukunta@microsemi.com \
    --cc=david.carroll@microsemi.com \
    --cc=gana.sridaran@microsemi.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=scott.benesh@microsemi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.