All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] ceph: Delete features that are not used in the kernel
@ 2020-08-19  7:57 Leon Romanovsky
  2020-08-19  8:47 ` Ilya Dryomov
  0 siblings, 1 reply; 3+ messages in thread
From: Leon Romanovsky @ 2020-08-19  7:57 UTC (permalink / raw)
  To: Ilya Dryomov, Jeff Layton; +Cc: Leon Romanovsky, ceph-devel, linux-kernel

From: Leon Romanovsky <leonro@nvidia.com>

The ceph_features.h has declaration of features that are not in-use
in kernel code. This causes to seeing such compilation warnings in
almost every kernel compilation.

./include/linux/ceph/ceph_features.h:14:24: warning: 'CEPH_FEATURE_UID' defined but not used [-Wunused-const-variable=]
   14 |  static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit);  \
      |                        ^~~~~~~~~~~~~
./include/linux/ceph/ceph_features.h:75:1: note: in expansion of macro 'DEFINE_CEPH_FEATURE'
   75 | DEFINE_CEPH_FEATURE( 0, 1, UID)
      | ^~~~~~~~~~~~~~~~~~~

The upstream kernel indeed doesn't have any use of them, so delete it.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
I'm sending this as RFC because probably the patch is wrong, but I
would like to bring your attention to the existing problem and asking
for an acceptable solution.
---
 include/linux/ceph/ceph_features.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h
index fcd84e8d88f4..922e74c84c76 100644
--- a/include/linux/ceph/ceph_features.h
+++ b/include/linux/ceph/ceph_features.h
@@ -72,13 +72,9 @@
  * the bit ever speak to each other.
  */

-DEFINE_CEPH_FEATURE( 0, 1, UID)
-DEFINE_CEPH_FEATURE( 1, 1, NOSRCADDR)
 DEFINE_CEPH_FEATURE_RETIRED( 2, 1, MONCLOCKCHECK, JEWEL, LUMINOUS)

-DEFINE_CEPH_FEATURE( 3, 1, FLOCK)
 DEFINE_CEPH_FEATURE( 4, 1, SUBSCRIBE2)
-DEFINE_CEPH_FEATURE( 5, 1, MONNAMES)
 DEFINE_CEPH_FEATURE( 6, 1, RECONNECT_SEQ)
 DEFINE_CEPH_FEATURE( 7, 1, DIRLAYOUTHASH)
 DEFINE_CEPH_FEATURE( 8, 1, OBJECTLOCATOR)
@@ -176,10 +172,7 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin
  * Features supported.
  */
 #define CEPH_FEATURES_SUPPORTED_DEFAULT		\
-	(CEPH_FEATURE_NOSRCADDR |		\
-	 CEPH_FEATURE_FLOCK |			\
-	 CEPH_FEATURE_SUBSCRIBE2 |		\
-	 CEPH_FEATURE_RECONNECT_SEQ |		\
+	(CEPH_FEATURE_RECONNECT_SEQ |		\
 	 CEPH_FEATURE_DIRLAYOUTHASH |		\
 	 CEPH_FEATURE_PGID64 |			\
 	 CEPH_FEATURE_PGPOOL3 |			\
--
2.26.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH] ceph: Delete features that are not used in the kernel
  2020-08-19  7:57 [RFC PATCH] ceph: Delete features that are not used in the kernel Leon Romanovsky
@ 2020-08-19  8:47 ` Ilya Dryomov
  2020-08-19  9:40   ` Leon Romanovsky
  0 siblings, 1 reply; 3+ messages in thread
From: Ilya Dryomov @ 2020-08-19  8:47 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: Jeff Layton, Leon Romanovsky, Ceph Development, LKML

On Wed, Aug 19, 2020 at 9:57 AM Leon Romanovsky <leon@kernel.org> wrote:
>
> From: Leon Romanovsky <leonro@nvidia.com>
>
> The ceph_features.h has declaration of features that are not in-use
> in kernel code. This causes to seeing such compilation warnings in
> almost every kernel compilation.
>
> ./include/linux/ceph/ceph_features.h:14:24: warning: 'CEPH_FEATURE_UID' defined but not used [-Wunused-const-variable=]
>    14 |  static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit);  \
>       |                        ^~~~~~~~~~~~~
> ./include/linux/ceph/ceph_features.h:75:1: note: in expansion of macro 'DEFINE_CEPH_FEATURE'
>    75 | DEFINE_CEPH_FEATURE( 0, 1, UID)
>       | ^~~~~~~~~~~~~~~~~~~
>
> The upstream kernel indeed doesn't have any use of them, so delete it.
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> I'm sending this as RFC because probably the patch is wrong, but I
> would like to bring your attention to the existing problem and asking
> for an acceptable solution.

Hi Leon,

Yes, removing unused feature definitions is wrong.  Annotating them
as potentially unused would be much better -- I'll send a patch.

I don't think any of us builds with W=1, so these things don't get
noticed.

Thanks,

                Ilya

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH] ceph: Delete features that are not used in the kernel
  2020-08-19  8:47 ` Ilya Dryomov
@ 2020-08-19  9:40   ` Leon Romanovsky
  0 siblings, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2020-08-19  9:40 UTC (permalink / raw)
  To: Ilya Dryomov; +Cc: Jeff Layton, Ceph Development, LKML

On Wed, Aug 19, 2020 at 10:47:38AM +0200, Ilya Dryomov wrote:
> On Wed, Aug 19, 2020 at 9:57 AM Leon Romanovsky <leon@kernel.org> wrote:
> >
> > From: Leon Romanovsky <leonro@nvidia.com>
> >
> > The ceph_features.h has declaration of features that are not in-use
> > in kernel code. This causes to seeing such compilation warnings in
> > almost every kernel compilation.
> >
> > ./include/linux/ceph/ceph_features.h:14:24: warning: 'CEPH_FEATURE_UID' defined but not used [-Wunused-const-variable=]
> >    14 |  static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit);  \
> >       |                        ^~~~~~~~~~~~~
> > ./include/linux/ceph/ceph_features.h:75:1: note: in expansion of macro 'DEFINE_CEPH_FEATURE'
> >    75 | DEFINE_CEPH_FEATURE( 0, 1, UID)
> >       | ^~~~~~~~~~~~~~~~~~~
> >
> > The upstream kernel indeed doesn't have any use of them, so delete it.
> >
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> > ---
> > I'm sending this as RFC because probably the patch is wrong, but I
> > would like to bring your attention to the existing problem and asking
> > for an acceptable solution.
>
> Hi Leon,
>
> Yes, removing unused feature definitions is wrong.  Annotating them
> as potentially unused would be much better -- I'll send a patch.
>
> I don't think any of us builds with W=1, so these things don't get
> noticed.

Thanks, W=1 is our default compilation level for Mellanox RDMA submissions.

>
> Thanks,
>
>                 Ilya

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-19  9:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19  7:57 [RFC PATCH] ceph: Delete features that are not used in the kernel Leon Romanovsky
2020-08-19  8:47 ` Ilya Dryomov
2020-08-19  9:40   ` Leon Romanovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.