From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
To: Jeffrey Hugo <quic_jhugo@quicinc.com>,
Colin Ian King <colin.i.king@gmail.com>,
Carl Vanderlip <quic_carlv@quicinc.com>,
"Oded Gabbay" <ogabbay@kernel.org>,
<linux-arm-msm@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>
Cc: <kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][next] accel/qaic: remove redundant assignment to pointer pexec
Date: Wed, 26 Jul 2023 19:08:00 +0530 [thread overview]
Message-ID: <c0b314db-bd29-7211-2a70-667405eb5bd0@quicinc.com> (raw)
In-Reply-To: <e457b416-3e63-0bae-0cd7-7788b43f30c1@quicinc.com>
On 7/26/2023 8:30 AM, Jeffrey Hugo wrote:
> On 7/25/2023 5:40 AM, Colin Ian King wrote:
>> Pointer pexec is being assigned a value however it is never read. The
>> assignment is redundant and can be removed.
>>
>> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
>> ---
>> drivers/accel/qaic/qaic_data.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/accel/qaic/qaic_data.c
>> b/drivers/accel/qaic/qaic_data.c
>> index e9a1cb779b30..8a6cb14f490e 100644
>> --- a/drivers/accel/qaic/qaic_data.c
>> +++ b/drivers/accel/qaic/qaic_data.c
>> @@ -1320,7 +1320,6 @@ static int __qaic_execute_bo_ioctl(struct
>> drm_device *dev, void *data, struct dr
>> user_data = u64_to_user_ptr(args->data);
>> exec = kcalloc(args->hdr.count, size, GFP_KERNEL);
>> - pexec = (struct qaic_partial_execute_entry *)exec;
>> if (!exec)
>> return -ENOMEM;
>
> It does look like pexec is not used in this function after it was
> refactored. Shouldn't the declaration at the beginning of the function
> also be removed?
Yeah we should remove the declaration as well. Although it is used some
where to calculate its size i.e. sizeof(*pexec). We need to directly use
the type in sizeof() i.e. sizeof(struct qaic_partial_execute_entry).
next prev parent reply other threads:[~2023-07-26 13:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-25 11:40 Colin Ian King
2023-07-25 16:03 ` Carl Vanderlip
2023-07-26 3:00 ` Jeffrey Hugo
2023-07-26 13:38 ` Pranjal Ramajor Asha Kanojiya [this message]
2023-07-26 13:52 ` Colin King (gmail)
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=c0b314db-bd29-7211-2a70-667405eb5bd0@quicinc.com \
--to=quic_pkanojiy@quicinc.com \
--cc=colin.i.king@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ogabbay@kernel.org \
--cc=quic_carlv@quicinc.com \
--cc=quic_jhugo@quicinc.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 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®