From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Herbert Xu <herbert@gondor.apana.org.au>, linux-crypto@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Joel Fernandes <joelf@ti.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/2] crypto: omap: Improve a size determination in three functions
Date: Fri, 23 Feb 2018 08:32:05 +0100 [thread overview]
Message-ID: <3916c49d-f74a-97a0-9240-de9a727bece9@users.sourceforge.net> (raw)
In-Reply-To: <20180222133813.GB28447@gondor.apana.org.au>
>> @@ -1032,14 +1032,13 @@ static int omap_aes_get_res_pdev(struct omap_aes_dev *dd,
>> static int omap_aes_probe(struct platform_device *pdev)
>> {
>> struct device *dev = &pdev->dev;
>> - struct omap_aes_dev *dd;
>> struct crypto_alg *algp;
>> struct aead_alg *aalg;
>> struct resource res;
>> int err = -ENOMEM, i, j, irq = -1;
>> u32 reg;
>> + struct omap_aes_dev *dd = devm_kzalloc(dev, sizeof(*dd), GFP_KERNEL);
>>
>> - dd = devm_kzalloc(dev, sizeof(struct omap_aes_dev), GFP_KERNEL);
>
> I'm fine with sizeof(*dd)
Thanks for your feedback.
> but please don't combine the allocation with the declaration.
Why do you not like such an implementation detail?
Regards,
Markus
prev parent reply other threads:[~2018-02-23 7:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 15:23 [PATCH 0/2] crypto/omap: Adjustments for three function implementations SF Markus Elfring
2018-02-14 15:25 ` [PATCH 1/2] crypto: omap: Delete an error message for a failed memory allocation in three functions SF Markus Elfring
2018-02-14 15:26 ` [PATCH 2/2] crypto: omap: Improve a size determination " SF Markus Elfring
2018-02-22 13:38 ` Herbert Xu
2018-02-23 7:32 ` SF Markus Elfring [this message]
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=3916c49d-f74a-97a0-9240-de9a727bece9@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=joelf@ti.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®