Skip to content

Commit 4dbde79

Browse files
rbmarlieremartinkpetersen
authored andcommitted
scsi: fcoe: Make fcoe_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the fcoe_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Link: https://lore.kernel.org/r/20240203-bus_cleanup-scsi-v1-1-6f552fb24f71@marliere.net Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 3d6776a commit 4dbde79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/scsi/fcoe/fcoe_sysfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ static const struct attribute_group *fcoe_fcf_attr_groups[] = {
597597
NULL,
598598
};
599599

600-
static struct bus_type fcoe_bus_type;
600+
static const struct bus_type fcoe_bus_type;
601601

602602
static int fcoe_bus_match(struct device *dev,
603603
struct device_driver *drv)
@@ -664,7 +664,7 @@ static struct attribute *fcoe_bus_attrs[] = {
664664
};
665665
ATTRIBUTE_GROUPS(fcoe_bus);
666666

667-
static struct bus_type fcoe_bus_type = {
667+
static const struct bus_type fcoe_bus_type = {
668668
.name = "fcoe",
669669
.match = &fcoe_bus_match,
670670
.bus_groups = fcoe_bus_groups,

0 commit comments

Comments
 (0)