Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2763817rdg; Mon, 16 Oct 2023 14:17:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHVFBECz35HMQ6dhXjgoJ/iY/dZgRvbynTho5h9lsecy/1n+jZtSFb6nr4Sb3mX9gDwJvHU X-Received: by 2002:a05:6830:1b7c:b0:6c0:a95b:44e4 with SMTP id d28-20020a0568301b7c00b006c0a95b44e4mr343718ote.38.1697491026425; Mon, 16 Oct 2023 14:17:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697491026; cv=none; d=google.com; s=arc-20160816; b=JieDshe1+NAmuglVGZ/vnXgej/pprk2H4X+bbgKqXgssEKYQxU8amIUOEbs+SK9Mbq 8yDn8Fc2l9mNrh635CcJlN9rH/i8Yzj6+3KqQwVybq1ozN/dVgxxeWmFda9/5lAMQSh+ l4oaDP682Iz8J8T6LMKpPWOy6FSNvGBvJnqbOsgxnAqUVTBzNHXTQSGsBVLea8NzAQW7 nddW4S6NfTay/u0Gdw4UVAexb1vldrz2zSY/IEwwzrgXWas+V5N1xLV/gV4RKKFuWjXc S/HCmC2p+BmDRveIaGhi4JLmGAV0Og8n1PwHuVrhBCH65/n0ry07ELB+JNJu13XJso9H 3gGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3SAiQPWvobnJto4O41BfA3AiFFWeyo/r47R6J0AOHwI=; fh=D8iPt1oB8qd9gMl6mK99qxvITTDcpI2hGW959yhDWOA=; b=KDfNtAOsiFLV2V32VSVM+TcQ22B4o1YT8kJvw8NOFMSkaJniW2XSxJQ8ZZTcBzRoqf f8f9WA3O1h8jkF8t1cUn02w95MstN5zd/zhm7ykkj3jKg6rM0z9rGUeyriDpWsFUHLlS D9rQFIB2sR99hTpnueJArdo0YZxKyt7mCxA6i39yULOE5y42Po6UMsvs43kEyoAEEu9T YTNlqT0UJd2sCnhvncZRdE3D7MID9kGfMHTYNy51s1bFYatrLbFVF4xYB75J6zCOdUkl 6j4AY5EcFJS9/1wJ5UTWFlCkcC9bBxb/JjGPAJOvi7SJrrhpbxDJQdgE2w4IVinFkJYu a2/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OM+MoNYf; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id b2-20020a056a00114200b0068a49a550b9si62050pfm.139.2023.10.16.14.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 14:17:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OM+MoNYf; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id D85448020B7E; Mon, 16 Oct 2023 14:17:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229943AbjJPVRB (ORCPT + 99 others); Mon, 16 Oct 2023 17:17:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229848AbjJPVRA (ORCPT ); Mon, 16 Oct 2023 17:17:00 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9491DAB for ; Mon, 16 Oct 2023 14:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697490971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3SAiQPWvobnJto4O41BfA3AiFFWeyo/r47R6J0AOHwI=; b=OM+MoNYfCySD5Imoxogqk7XOJp8q7uvtXL+dGrH9oj8mN/gKx4LaPmeTSbGyjT19CtTENo HOryqGXq3Y+hSWzKZBB1BJ8/M4+LYQelHVH8yW+n1TjvFUocTOMj7ewDETv+eG/W+/Q7hT xIAnVa9Co0p607wBAN+NwkJFaiuBpMg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-214-t7KphYJbOD-QLBESvVMFOw-1; Mon, 16 Oct 2023 17:16:09 -0400 X-MC-Unique: t7KphYJbOD-QLBESvVMFOw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 463C7185A79B; Mon, 16 Oct 2023 21:16:07 +0000 (UTC) Received: from [192.168.37.1] (unknown [10.22.48.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 28779492BFA; Mon, 16 Oct 2023 21:16:04 +0000 (UTC) From: Benjamin Coddington To: Geert Uytterhoeven Cc: Trond Myklebust , Anna Schumaker , Chuck Lever , Jeff Layton , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , linux-nfs@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next v3 2/2] sunrpc: Use no_printk() in dfprintk*() dummies Date: Mon, 16 Oct 2023 17:16:03 -0400 Message-ID: In-Reply-To: <180fd042261dcd4243fad90660b114b8f0a78dcd.1697460614.git.geert+renesas@glider.be> References: <180fd042261dcd4243fad90660b114b8f0a78dcd.1697460614.git.geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 morse.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 (morse.vger.email [0.0.0.0]); Mon, 16 Oct 2023 14:17:02 -0700 (PDT) On 16 Oct 2023, at 9:09, Geert Uytterhoeven wrote: > When building NFS with W=3D1 and CONFIG_WERROR=3Dy, but > CONFIG_SUNRPC_DEBUG=3Dn: > > fs/nfs/nfs4proc.c: In function =E2=80=98nfs4_proc_create_session=E2= =80=99: > fs/nfs/nfs4proc.c:9276:19: error: variable =E2=80=98ptr=E2=80=99 se= t but not used [-Werror=3Dunused-but-set-variable] > 9276 | unsigned *ptr; > | ^~~ > CC fs/nfs/callback.o > fs/nfs/callback.c: In function =E2=80=98nfs41_callback_svc=E2=80=99= : > fs/nfs/callback.c:98:13: error: variable =E2=80=98error=E2=80=99 se= t but not used [-Werror=3Dunused-but-set-variable] > 98 | int error; > | ^~~~~ > CC fs/nfs/flexfilelayout/flexfilelayout.o > fs/nfs/flexfilelayout/flexfilelayout.c: In function =E2=80=98ff_lay= out_io_track_ds_error=E2=80=99: > fs/nfs/flexfilelayout/flexfilelayout.c:1230:13: error: variable =E2= =80=98err=E2=80=99 set but not used [-Werror=3Dunused-but-set-variable] > 1230 | int err; > | ^~~ > CC fs/nfs/flexfilelayout/flexfilelayoutdev.o > fs/nfs/flexfilelayout/flexfilelayoutdev.c: In function =E2=80=98nfs= 4_ff_alloc_deviceid_node=E2=80=99: > fs/nfs/flexfilelayout/flexfilelayoutdev.c:55:16: error: variable =E2= =80=98ret=E2=80=99 set but not used [-Werror=3Dunused-but-set-variable] > 55 | int i, ret =3D -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() in fs/lockd/svclock.c, as its referenc= e > is now visible to the compiler, but optimized away. > > Signed-off-by: Geert Uytterhoeven > Acked-by: Jeff Layton Reviewed-by: Benjamin Coddington Ben