mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Igor Pylypiv <ipylypiv@google.com>,
	Damien Le Moal <dlemoal@kernel.org>,
	Niklas Cassel <cassel@kernel.org>,
	Jason Yan <yanaijie@huawei.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Jack Wang <jinpu.wang@cloud.ionos.com>,
	Hannes Reinecke <hare@suse.de>,
	Xiang Chen <chenxiang66@hisilicon.com>,
	Artur Paszkiewicz <artur.paszkiewicz@intel.com>,
	Bart Van Assche <bvanassche@acm.org>
Cc: TJ Adams <tadamsjr@google.com>,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/7] scsi: libsas: Define NCQ Priority sysfs attributes for SATA devices
Date: Tue, 5 Mar 2024 11:29:11 +0000	[thread overview]
Message-ID: <3fb62749-8c66-47ae-9b8b-7e670ebf4841@oracle.com> (raw)
In-Reply-To: <20240305005103.1849325-3-ipylypiv@google.com>

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

  parent reply	other threads:[~2024-03-05 11:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05  0:50 [PATCH v5 0/7] NCQ Priority sysfs sttributes for libsas Igor Pylypiv
2024-03-05  0:50 ` [PATCH v5 1/7] ata: libata-sata: Factor out NCQ Priority configuration helpers Igor Pylypiv
2024-03-05  2:44   ` Jason Yan
2024-03-05  0:50 ` [PATCH v5 2/7] scsi: libsas: Define NCQ Priority sysfs attributes for SATA devices Igor Pylypiv
2024-03-05  2:44   ` Jason Yan
2024-03-05 11:29   ` John Garry [this message]
2024-03-05 23:58     ` Igor Pylypiv
2024-03-05  0:50 ` [PATCH v5 3/7] scsi: pm80xx: Add libsas SATA sysfs attributes group Igor Pylypiv
2024-03-05  2:45   ` Jason Yan
2024-03-05  0:51 ` [PATCH v5 4/7] scsi: mvsas: " Igor Pylypiv
2024-03-05  2:45   ` Jason Yan
2024-03-05  0:51 ` [PATCH v5 5/7] scsi: hisi_sas: " Igor Pylypiv
2024-03-05  2:46   ` Jason Yan
2024-03-05  0:51 ` [PATCH v5 6/7] scsi: aic94xx: " Igor Pylypiv
2024-03-05  2:46   ` Jason Yan
2024-03-05  0:51 ` [PATCH v5 7/7] scsi: isci: " Igor Pylypiv
2024-03-05  2:47   ` Jason Yan

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=3fb62749-8c66-47ae-9b8b-7e670ebf4841@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=artur.paszkiewicz@intel.com \
    --cc=bvanassche@acm.org \
    --cc=cassel@kernel.org \
    --cc=chenxiang66@hisilicon.com \
    --cc=dlemoal@kernel.org \
    --cc=hare@suse.de \
    --cc=ipylypiv@google.com \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=tadamsjr@google.com \
    --cc=yanaijie@huawei.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®