lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3fb62749-8c66-47ae-9b8b-7e670ebf4841@oracle.com>
Date: Tue, 5 Mar 2024 11:29:11 +0000
From: John Garry <john.g.garry@...cle.com>
To: Igor Pylypiv <ipylypiv@...gle.com>, Damien Le Moal <dlemoal@...nel.org>,
        Niklas Cassel <cassel@...nel.org>, Jason Yan <yanaijie@...wei.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Jack Wang <jinpu.wang@...ud.ionos.com>, Hannes Reinecke <hare@...e.de>,
        Xiang Chen <chenxiang66@...ilicon.com>,
        Artur Paszkiewicz <artur.paszkiewicz@...el.com>,
        Bart Van Assche <bvanassche@....org>
Cc: TJ Adams <tadamsjr@...gle.com>, linux-ide@...r.kernel.org,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 2/7] scsi: libsas: Define NCQ Priority sysfs attributes
 for SATA devices

On 05/03/2024 00:50, Igor Pylypiv wrote:
>   
>   static inline void sas_ata_disabled_notice(void)
> @@ -123,6 +125,10 @@ static inline int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *p
>   	sas_ata_disabled_notice();
>   	return -ENODEV;
>   }
> +
> +static const struct attribute_group sas_ata_sdev_attr_group = {
> +	.attrs = NULL,
> +};

I just noticed a build issue.

With CONFIG_SCSI_SAS_ATA not set, I get this for W=1 build:

In file included from drivers/scsi/hisi_sas/hisi_sas.h:29,
                 from drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:7:
/include/scsi/sas_ata.h:129:37: error: ‘sas_ata_sdev_attr_group’
defined but not used [-Werror=unused-const-variable=]
  129 | static const struct attribute_group sas_ata_sdev_attr_group = {

I suppose that marking sas_ata_sdev_attr_group as __maybe_unused is ok, 
but less than ideal. The linker should strip it out of files when unused.

I think that this is also ok:

#define sas_ata_sdev_attr_group (struct attribute_group) {}

The compiler here will create a empty structure and have 
&sas_ata_sdev_attr_group point at it.

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ