mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marco Elver <elver@google.com>
To: Jogi Dishank <jogidishank503@gmail.com>
Cc: dvyukov@google.com, kasan-dev@googlegroups.com,
	linux-kernel@vger.kernel.org, rathod.darshan.0896@gmail.com
Subject: Re: [PATCH] kcsan: clean up redundant empty macro arguments in atomic ops.
Date: Mon, 28 Jul 2025 13:51:30 +0200	[thread overview]
Message-ID: <aIdkQixt-tfT7IPw@elver.google.com> (raw)
In-Reply-To: <CADorM--0n1zeT8jxT3LtjmqrP5Cp1g-hFS=oz_12SptjZwRWtw@mail.gmail.com>

On Mon, Jul 28, 2025 at 05:11PM +0530, Jogi Dishank wrote:
> Yes, I build the kernel with the change.
> And it's build without any error.

You have to set CONFIG_KCSAN=y

kernel/kcsan/core.c:1270:1: error: too few arguments provided to function-like macro invocation
 1270 | DEFINE_TSAN_ATOMIC_OPS(8);
      | ^
kernel/kcsan/core.c:1261:40: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1261 |         DEFINE_TSAN_ATOMIC_RMW(fetch_sub, bits);                                                 \
      |                                               ^
kernel/kcsan/core.c:1193:9: note: macro 'DEFINE_TSAN_ATOMIC_RMW' defined here
 1193 | #define DEFINE_TSAN_ATOMIC_RMW(op, bits, suffix)                                                   \
      |         ^
kernel/kcsan/core.c:1270:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
 1270 | DEFINE_TSAN_ATOMIC_OPS(8);
      | ^
kernel/kcsan/core.c:1261:2: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1261 |         DEFINE_TSAN_ATOMIC_RMW(fetch_sub, bits);                                                 \
      |         ^
kernel/kcsan/core.c:1270:1: error: too few arguments provided to function-like macro invocation
kernel/kcsan/core.c:1262:40: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1262 |         DEFINE_TSAN_ATOMIC_RMW(fetch_and, bits);                                                 \
      |                                               ^
kernel/kcsan/core.c:1193:9: note: macro 'DEFINE_TSAN_ATOMIC_RMW' defined here
 1193 | #define DEFINE_TSAN_ATOMIC_RMW(op, bits, suffix)                                                   \
      |         ^
kernel/kcsan/core.c:1270:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
 1270 | DEFINE_TSAN_ATOMIC_OPS(8);
      | ^
kernel/kcsan/core.c:1262:2: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1262 |         DEFINE_TSAN_ATOMIC_RMW(fetch_and, bits);                                                 \
      |         ^
kernel/kcsan/core.c:1270:1: error: too few arguments provided to function-like macro invocation
kernel/kcsan/core.c:1263:39: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1263 |         DEFINE_TSAN_ATOMIC_RMW(fetch_or, bits);                                                  \
      |                                              ^
kernel/kcsan/core.c:1193:9: note: macro 'DEFINE_TSAN_ATOMIC_RMW' defined here
 1193 | #define DEFINE_TSAN_ATOMIC_RMW(op, bits, suffix)                                                   \
      |         ^
kernel/kcsan/core.c:1270:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
 1270 | DEFINE_TSAN_ATOMIC_OPS(8);
      | ^
kernel/kcsan/core.c:1263:2: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1263 |         DEFINE_TSAN_ATOMIC_RMW(fetch_or, bits);                                                  \
      |         ^
kernel/kcsan/core.c:1271:1: error: too few arguments provided to function-like macro invocation
 1271 | DEFINE_TSAN_ATOMIC_OPS(16);
      | ^
kernel/kcsan/core.c:1261:40: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1261 |         DEFINE_TSAN_ATOMIC_RMW(fetch_sub, bits);                                                 \
      |                                               ^
kernel/kcsan/core.c:1193:9: note: macro 'DEFINE_TSAN_ATOMIC_RMW' defined here
 1193 | #define DEFINE_TSAN_ATOMIC_RMW(op, bits, suffix)                                                   \
      |         ^
kernel/kcsan/core.c:1271:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
 1271 | DEFINE_TSAN_ATOMIC_OPS(16);
      | ^
kernel/kcsan/core.c:1261:2: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1261 |         DEFINE_TSAN_ATOMIC_RMW(fetch_sub, bits);                                                 \
      |         ^
kernel/kcsan/core.c:1271:1: error: too few arguments provided to function-like macro invocation
kernel/kcsan/core.c:1262:40: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1262 |         DEFINE_TSAN_ATOMIC_RMW(fetch_and, bits);                                                 \
      |                                               ^
kernel/kcsan/core.c:1193:9: note: macro 'DEFINE_TSAN_ATOMIC_RMW' defined here
 1193 | #define DEFINE_TSAN_ATOMIC_RMW(op, bits, suffix)                                                   \
      |         ^
kernel/kcsan/core.c:1271:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
 1271 | DEFINE_TSAN_ATOMIC_OPS(16);
      | ^
kernel/kcsan/core.c:1262:2: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1262 |         DEFINE_TSAN_ATOMIC_RMW(fetch_and, bits);                                                 \
      |         ^
kernel/kcsan/core.c:1271:1: error: too few arguments provided to function-like macro invocation
kernel/kcsan/core.c:1263:39: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1263 |         DEFINE_TSAN_ATOMIC_RMW(fetch_or, bits);                                                  \
      |                                              ^
kernel/kcsan/core.c:1193:9: note: macro 'DEFINE_TSAN_ATOMIC_RMW' defined here
 1193 | #define DEFINE_TSAN_ATOMIC_RMW(op, bits, suffix)                                                   \
      |         ^
kernel/kcsan/core.c:1271:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
 1271 | DEFINE_TSAN_ATOMIC_OPS(16);
      | ^
kernel/kcsan/core.c:1263:2: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1263 |         DEFINE_TSAN_ATOMIC_RMW(fetch_or, bits);                                                  \
      |         ^
  CC      lib/crypto/mpi/mpi-cmp.o
kernel/kcsan/core.c:1272:1: error: too few arguments provided to function-like macro invocation
 1272 | DEFINE_TSAN_ATOMIC_OPS(32);
      | ^
kernel/kcsan/core.c:1261:40: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1261 |         DEFINE_TSAN_ATOMIC_RMW(fetch_sub, bits);                                                 \
      |                                               ^
kernel/kcsan/core.c:1193:9: note: macro 'DEFINE_TSAN_ATOMIC_RMW' defined here
 1193 | #define DEFINE_TSAN_ATOMIC_RMW(op, bits, suffix)                                                   \
      |         ^
kernel/kcsan/core.c:1272:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
 1272 | DEFINE_TSAN_ATOMIC_OPS(32);
      | ^
kernel/kcsan/core.c:1261:2: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1261 |         DEFINE_TSAN_ATOMIC_RMW(fetch_sub, bits);                                                 \
      |         ^
kernel/kcsan/core.c:1272:1: error: too few arguments provided to function-like macro invocation
kernel/kcsan/core.c:1262:40: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1262 |         DEFINE_TSAN_ATOMIC_RMW(fetch_and, bits);                                                 \
      |                                               ^
kernel/kcsan/core.c:1193:9: note: macro 'DEFINE_TSAN_ATOMIC_RMW' defined here
 1193 | #define DEFINE_TSAN_ATOMIC_RMW(op, bits, suffix)                                                   \
      |         ^
kernel/kcsan/core.c:1272:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
 1272 | DEFINE_TSAN_ATOMIC_OPS(32);
      | ^
kernel/kcsan/core.c:1262:2: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1262 |         DEFINE_TSAN_ATOMIC_RMW(fetch_and, bits);                                                 \
      |         ^
kernel/kcsan/core.c:1272:1: error: too few arguments provided to function-like macro invocation
kernel/kcsan/core.c:1263:39: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1263 |         DEFINE_TSAN_ATOMIC_RMW(fetch_or, bits);                                                  \
      |                                              ^
kernel/kcsan/core.c:1193:9: note: macro 'DEFINE_TSAN_ATOMIC_RMW' defined here
 1193 | #define DEFINE_TSAN_ATOMIC_RMW(op, bits, suffix)                                                   \
      |         ^
kernel/kcsan/core.c:1272:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
 1272 | DEFINE_TSAN_ATOMIC_OPS(32);
      | ^
kernel/kcsan/core.c:1263:2: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1263 |         DEFINE_TSAN_ATOMIC_RMW(fetch_or, bits);                                                  \
      |         ^
kernel/kcsan/core.c:1274:1: error: too few arguments provided to function-like macro invocation
 1274 | DEFINE_TSAN_ATOMIC_OPS(64);
      | ^
kernel/kcsan/core.c:1261:40: note: expanded from macro 'DEFINE_TSAN_ATOMIC_OPS'
 1261 |         DEFINE_TSAN_ATOMIC_RMW(fetch_sub, bits);                                                 \
      |                                               ^
kernel/kcsan/core.c:1193:9: note: macro 'DEFINE_TSAN_ATOMIC_RMW' defined here
 1193 | #define DEFINE_TSAN_ATOMIC_RMW(op, bits, suffix)                                                   \
      |         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]

  parent reply	other threads:[~2025-07-28 11:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28 10:43 Dishank Jogi
2025-07-28 10:55 ` Marco Elver
     [not found]   ` <CADorM--0n1zeT8jxT3LtjmqrP5Cp1g-hFS=oz_12SptjZwRWtw@mail.gmail.com>
2025-07-28 11:51     ` Marco Elver [this message]
2025-07-28 20:31 ` kernel test robot
2025-07-28 21:44 ` kernel test robot
2025-07-29  5:17   ` Jogi Dishank

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=aIdkQixt-tfT7IPw@elver.google.com \
    --to=elver@google.com \
    --cc=dvyukov@google.com \
    --cc=jogidishank503@gmail.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rathod.darshan.0896@gmail.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®