Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp202895rdg; Thu, 12 Oct 2023 03:17:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqOhCConQWjtKriYLGZ5GmiA7Ic5R3Va604UP3VdE+asPufJrjhiu0WSQLmboJarQfm/Rw X-Received: by 2002:a17:903:41c1:b0:1c4:1cd3:8068 with SMTP id u1-20020a17090341c100b001c41cd38068mr33800535ple.5.1697105858868; Thu, 12 Oct 2023 03:17:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697105858; cv=none; d=google.com; s=arc-20160816; b=lUnKWlKcHGTPcvLKt81NA3XwOwv9SDLrg+1DMbdJRmsdqu1GxIwTl8yRBfDXcffnu8 jtZXB/T+RHfMJmunVr0+MwjOlA6GiXIqOV0M/h3tsHLXMyOUYfJfMYkWHkmpZFh6sgbR X7J+r9I2Sk5tqZmA7c2LRZ4Qmpj0isb5gwGdmxQrw5QzMuxfXe5zGs00PcusgUMnvCfF ONDOucnDQC+DpOGmJ13aZ0jJbud7IUeqvxadFVkjLf9BbdQqt7BHKs2A5Ghsqq+wO+fP xfl6tzdTMgco+KVbkCkGbv6V3+dw34ZhB7xiqscm49tnBzNXK67bVgsUJA+OXOU/8YRU zRLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=7eUVyb1ASPgwpqKlZfpdpq0MQruxle+A247p6PjuHrE=; fh=GEcUdsBr1iy80ZC5mlKsn2qbGG1hl3WbHvDclLZYjPk=; b=0wu+3CNk11GolDgA09EccDBJAe0EUscm0h5e9RTGJ2uFLoePxOuupCPMOeSehKnUd6 wFnoNFToW+uDnvvnHt0RgMdTh6AyXCTD5z7ICtpVewiSlvCSlFPuoYrRuel5ABakRHpj 88Vu7MKz2lCl4REHZu7C/Dw/TFFs7J1brLLOAB3jvBvsHiEw4ISw/8KwT5saFel7QNuM bgODXCLSczM1OiPiJPqXCNdu+TeMmGoiwusDOpidvMtc8M8bJSBl31MAngf24HtG4J9V 0lVrrj2OveHsb6U6xjnuDO/cBpbM9I2hAg1FLZJMRXBhM6MaV3CgzOEx5YSuE/Urn3o+ uxRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id ld16-20020a170902fad000b001befd0512ecsi1713495plb.314.2023.10.12.03.17.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 03:17:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A26B181130C6; Thu, 12 Oct 2023 03:17:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347120AbjJLKRd convert rfc822-to-8bit (ORCPT + 99 others); Thu, 12 Oct 2023 06:17:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347110AbjJLKRc (ORCPT ); Thu, 12 Oct 2023 06:17:32 -0400 Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BD89C4; Thu, 12 Oct 2023 03:17:30 -0700 (PDT) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-59f6492b415so6523687b3.0; Thu, 12 Oct 2023 03:17:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697105849; x=1697710649; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G7H6hbQOaTA6o7GepYq/s3qB0kUcBwxXV7q1sULTA+o=; b=C8UXiZTYGk9XTMAOCB1TQ4VptPRoNHqt+P/4EDNJRWMgfalk6zI1EAAT6eVYez8cjv tH3j+BFTDnJVEAXUKuq/7ZLqDTfBAioprH0n4lRluOMgDCr2dJfGMfLpKqjhdyqzDJrX 35kwaRYzBk7xR1VvpUbRc4CgfD4dQvHHcPEBtcEm9JZNVAm9+lFfxpy2LcS+iBLjKqtm rlMRljJWMlhTzphSiRx+C68tgYkeNy7PBxM3DccHStjy4qdAvw46EoX5H6UcBdL7fnVl TJPAWDtUIoNsQKRoHCLOSX3mKYzSpvw0v7vLEiDQwbjSvjWv6FVSbOzsKuQPFSmBatLo jgtw== X-Gm-Message-State: AOJu0YxZSxjuH4Q9Cuht3kpLBfAglLbu/NmdU+kNcIN8FwTdlPRK51lJ eRkxplSrfHCm1RIgHbdRy6lTvlc+AJIsFg== X-Received: by 2002:a05:690c:2846:b0:5a7:b545:dcaa with SMTP id ed6-20020a05690c284600b005a7b545dcaamr5184345ywb.23.1697105849361; Thu, 12 Oct 2023 03:17:29 -0700 (PDT) Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com. [209.85.128.180]) by smtp.gmail.com with ESMTPSA id r135-20020a0de88d000000b005a1cc37aff1sm5729089ywe.20.2023.10.12.03.17.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Oct 2023 03:17:29 -0700 (PDT) Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-59f6492b415so6523607b3.0; Thu, 12 Oct 2023 03:17:29 -0700 (PDT) X-Received: by 2002:a0d:d78b:0:b0:5a7:be3f:c451 with SMTP id z133-20020a0dd78b000000b005a7be3fc451mr5103713ywd.3.1697105848998; Thu, 12 Oct 2023 03:17:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Geert Uytterhoeven Date: Thu, 12 Oct 2023 12:17:17 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH -next v2] sunrpc: Use no_printk() in dfprintk*() dummies To: Chuck Lever , Jeff Layton , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Trond Myklebust , Anna Schumaker Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 12 Oct 2023 03:17:33 -0700 (PDT) On Thu, Oct 12, 2023 at 12:08 PM Geert Uytterhoeven wrote: > When building NFS with W=1 and CONFIG_WERROR=y, but > CONFIG_SUNRPC_DEBUG=n: > > fs/nfs/nfs4proc.c: In function ‘nfs4_proc_create_session’: > fs/nfs/nfs4proc.c:9276:19: error: variable ‘ptr’ set but not used [-Werror=unused-but-set-variable] > 9276 | unsigned *ptr; > | ^~~ > CC fs/nfs/callback.o > fs/nfs/callback.c: In function ‘nfs41_callback_svc’: > fs/nfs/callback.c:98:13: error: variable ‘error’ set but not used [-Werror=unused-but-set-variable] > 98 | int error; > | ^~~~~ > CC fs/nfs/flexfilelayout/flexfilelayout.o > fs/nfs/flexfilelayout/flexfilelayout.c: In function ‘ff_layout_io_track_ds_error’: > fs/nfs/flexfilelayout/flexfilelayout.c:1230:13: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable] > 1230 | int err; > | ^~~ > CC fs/nfs/flexfilelayout/flexfilelayoutdev.o > fs/nfs/flexfilelayout/flexfilelayoutdev.c: In function ‘nfs4_ff_alloc_deviceid_node’: > fs/nfs/flexfilelayout/flexfilelayoutdev.c:55:16: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable] > 55 | int i, ret = -ENOMEM; > | ^~~ > > All these are due to variables that are set unconditionally, but are > used only when debugging is enabled. > > Fix this by changing the dfprintk*() dummy macros from empty loops to > calls to the no_printk() helper. This informs the compiler that the > passed debug parameters are actually used, and enables format specifier > checking as a bonus. > > This requires removing the protection by CONFIG_SUNRPC_DEBUG of the > declaration of nlmdbg_cookie2a(), as its reference is now visible to the > compiler, but optimized away. > > Signed-off-by: Geert Uytterhoeven > --- > v2: > - s/uncontionally/unconditionally/, > - Drop CONFIG_SUNRPC_DEBUG check in fs/lockd/svclock.c to fix build > failure. The robots pointed out a second build failure, which is not fixed by this v2: https://lore.kernel.org/all/202310121759.0CF34DcN-lkp@intel.com/ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds