linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hkallweit1@gmail.com (Heiner Kallweit)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] firmware: arm_scpi: drop unnecessary type cast to scpi_shared_mem
Date: Fri, 6 Oct 2017 20:47:43 +0200	[thread overview]
Message-ID: <17c7e5f2-4497-bc0c-bc6b-b09474bbebbf@gmail.com> (raw)
In-Reply-To: <2f742de8-3742-ef61-8d77-27adfbdce877@arm.com>

Am 06.10.2017 um 10:51 schrieb Sudeep Holla:
> 
> 
> On 05/10/17 20:06, Heiner Kallweit wrote:
>> Am 05.10.2017 um 13:11 schrieb Sudeep Holla:
>>> This patch drops the only present type cast of the SCPI payload pointer
>>> to scpi_shared_mem inorder to align with other occurrences, IOW for
>>> consistency.
>>>
>>> Cc: Heiner Kallweit <hkallweit1@gmail.com>
>>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>>> ---
>>>  drivers/firmware/arm_scpi.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
>>> index c923d1ebfa3e..a888970f1347 100644
>>> --- a/drivers/firmware/arm_scpi.c
>>> +++ b/drivers/firmware/arm_scpi.c
>>> @@ -453,7 +453,7 @@ static void scpi_tx_prepare(struct mbox_client *c, void *msg)
>>>  	unsigned long flags;
>>>  	struct scpi_xfer *t = msg;
>>>  	struct scpi_chan *ch = container_of(c, struct scpi_chan, cl);
>>> -	struct scpi_shared_mem *mem = (struct scpi_shared_mem *)ch->tx_payload;
>>> +	struct scpi_shared_mem *mem = ch->tx_payload;
>>>  
>> This should work fine, however it might not be 100% clean with regard to __iomem
>> annotation. ch->tx_payload is of type "void __iomem *" and I would assume that
>> sparse complains about the new statement.
> 
> Yes sparse complains for both(with or without typecast)
> 
>> The old one casts away the __iomem, what isn't much better IMO.
>>
> 
> Agreed.
> 
>> By the way, I think this also applies to other places in this driver
>> where ch->rx/tx_payload are used.
>>
> 
> Yes, but do you have any alternatives in your mind ? I am happy to hear
> that.
> 
I'll send a patch addressing this issue.

      reply	other threads:[~2017-10-06 18:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 11:11 [PATCH 1/2] firmware: arm_scpi: drop unnecessary type cast to scpi_shared_mem Sudeep Holla
2017-10-05 11:11 ` [PATCH 2/2] firmware: arm_scpi: remove all single element structures Sudeep Holla
2017-10-05 19:07   ` Heiner Kallweit
2017-10-06  8:53     ` Sudeep Holla
2017-10-06 18:51       ` Heiner Kallweit
2017-10-05 19:06 ` [PATCH 1/2] firmware: arm_scpi: drop unnecessary type cast to scpi_shared_mem Heiner Kallweit
2017-10-06  8:51   ` Sudeep Holla
2017-10-06 18:47     ` Heiner Kallweit [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=17c7e5f2-4497-bc0c-bc6b-b09474bbebbf@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).