All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH v2 20/22] ata: sata_fsl: fix cmdhdr_tbl_entry and prde struct definitions
Date: Tue, 4 Jan 2022 12:45:35 +0100	[thread overview]
Message-ID: <345fa64f-a5a8-d6ff-8bf3-e3cd38c53445@suse.de> (raw)
In-Reply-To: <20220104105843.1730172-21-damien.lemoal@opensource.wdc.com>

On 1/4/22 11:58 AM, Damien Le Moal wrote:
> The fields of the cmdhdr_tbl_entry structure all store __le32 values,
> and so are the dba and ddc_and_ext fields of the prde structure. Define
> these fields using the __le32 type to avoid sparse warnings about
> incorrect type in assignment.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> ---
>  drivers/ata/sata_fsl.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
> index 101d4dd79f62..13d532193405 100644
> --- a/drivers/ata/sata_fsl.c
> +++ b/drivers/ata/sata_fsl.c
> @@ -221,10 +221,10 @@ enum {
>   * 4 Dwords per command slot, command header size ==  64 Dwords.
>   */
>  struct cmdhdr_tbl_entry {
> -	u32 cda;
> -	u32 prde_fis_len;
> -	u32 ttl;
> -	u32 desc_info;
> +	__le32 cda;
> +	__le32 prde_fis_len;
> +	__le32 ttl;
> +	__le32 desc_info;
>  };
>  
>  /*
> @@ -259,9 +259,9 @@ struct command_desc {
>   */
>  
>  struct prde {
> -	u32 dba;
> +	__le32 dba;
>  	u8 fill[2 * 4];
> -	u32 ddc_and_ext;
> +	__le32 ddc_and_ext;
>  };
>  
>  /*
> 
... which means that _technically_ we should modify the log message in
sata_fsl_setup_cmd_hdr_entry() to use le32_to_cpu(), too, to avoid
garbled numbers on big endian. Or maybe not, if we argue that we want
to print out the values as sent to the HW.

Anyway.

Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer

  reply	other threads:[~2022-01-04 11:45 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 10:58 [PATCH v2 00/22] Improve compile test coverage Damien Le Moal
2022-01-04 10:58 ` [PATCH v2 01/22] ata: sata_fsl: add compile test support Damien Le Moal
2022-01-04 11:28   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 02/22] ata: ahci_brcm: " Damien Le Moal
2022-01-04 11:28   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 03/22] ata: ahci_da850: " Damien Le Moal
2022-01-04 11:29   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 04/22] ata: ahci_dm816: " Damien Le Moal
2022-01-04 11:29   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 05/22] ata: ahci_st: " Damien Le Moal
2022-01-04 11:29   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 06/22] ata: ahci_mtk: " Damien Le Moal
2022-01-04 11:30   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 07/22] ata: ahci_mvebu: " Damien Le Moal
2022-01-04 11:30   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 08/22] ata: ahci_sunxi: " Damien Le Moal
2022-01-04 11:30   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 09/22] ata: ahci_tegra: " Damien Le Moal
2022-01-04 11:31   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 10/22] ata: ahci_xgene: " Damien Le Moal
2022-01-04 11:31   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 11/22] ata: ahci_seattle: " Damien Le Moal
2022-01-04 11:31   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 12/22] ata: pata_bk3710: " Damien Le Moal
2022-01-04 11:31   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 13/22] ata: pata_cs5535: " Damien Le Moal
2022-01-04 11:35   ` Hannes Reinecke
2022-01-06  4:50     ` Damien Le Moal
2022-01-05 22:57   ` kernel test robot
2022-01-04 10:58 ` [PATCH v2 14/22] ata: pata_ftide010: " Damien Le Moal
2022-01-04 11:35   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 15/22] ata: pata_imx: " Damien Le Moal
2022-01-04 11:35   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 16/22] ata: pata_pxa: " Damien Le Moal
2022-01-04 11:36   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 17/22] ata: pata_legacy: " Damien Le Moal
2022-01-04 11:39   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 18/22] ata: pata_samsung_cf: " Damien Le Moal
2022-01-04 11:40   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 19/22] ata: sata_fsl: fix scsi host initialization Damien Le Moal
2022-01-04 11:41   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 20/22] ata: sata_fsl: fix cmdhdr_tbl_entry and prde struct definitions Damien Le Moal
2022-01-04 11:45   ` Hannes Reinecke [this message]
2022-01-05  3:39     ` Damien Le Moal
2022-01-04 10:58 ` [PATCH v2 21/22] ata: ahci_xgene: use correct type for port mmio address Damien Le Moal
2022-01-04 11:46   ` Hannes Reinecke
2022-01-04 10:58 ` [PATCH v2 22/22] ata: ahci_xgene: Fix id array access in xgene_ahci_read_id() Damien Le Moal
2022-01-04 11:51   ` Hannes Reinecke
2022-01-05  3:40     ` Damien Le Moal

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=345fa64f-a5a8-d6ff-8bf3-e3cd38c53445@suse.de \
    --to=hare@suse.de \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=linux-ide@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 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.