Skip to content

Commit ac64a2c

Browse files
ddissNicholas Bellinger
authored andcommitted
target: use stringify.h instead of own definition
Signed-off-by: David Disseldorp <ddiss@suse.de> Acked-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
1 parent ed97d0c commit ac64a2c

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

drivers/target/target_core_user.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <linux/parser.h>
2626
#include <linux/vmalloc.h>
2727
#include <linux/uio_driver.h>
28+
#include <linux/stringify.h>
2829
#include <net/genetlink.h>
2930
#include <scsi/scsi_common.h>
3031
#include <scsi/scsi_proto.h>
@@ -898,7 +899,7 @@ static int tcmu_configure_device(struct se_device *dev)
898899
WARN_ON(!PAGE_ALIGNED(udev->data_off));
899900
WARN_ON(udev->data_size % PAGE_SIZE);
900901

901-
info->version = xstr(TCMU_MAILBOX_VERSION);
902+
info->version = __stringify(TCMU_MAILBOX_VERSION);
902903

903904
info->mem[0].name = "tcm-user command & data buffer";
904905
info->mem[0].addr = (phys_addr_t) udev->mb_addr;

include/uapi/linux/target_core_user.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@
4242
#define TCMU_MAILBOX_VERSION 2
4343
#define ALIGN_SIZE 64 /* Should be enough for most CPUs */
4444

45-
/* See https://gcc.gnu.org/onlinedocs/cpp/Stringification.html */
46-
#define xstr(s) str(s)
47-
#define str(s) #s
48-
4945
struct tcmu_mailbox {
5046
__u16 version;
5147
__u16 flags;

0 commit comments

Comments
 (0)