Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1665123rda; Mon, 23 Oct 2023 22:16:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFntOITxOlRbNWV9KCDbeWOgK2gdR+pLgVQm3W+Cga426gBj6Jp9D/91qtSfZa+ZZpZwXkS X-Received: by 2002:a05:6102:10c3:b0:457:cc13:29f6 with SMTP id t3-20020a05610210c300b00457cc1329f6mr10793658vsr.31.1698124601674; Mon, 23 Oct 2023 22:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698124601; cv=none; d=google.com; s=arc-20160816; b=WFrqX+KQFiGvWKWijlFzX+YfcHcj9iTg6rp/ybwdTgIeLV4FTmkyoj2h4ktt30PU2m rmfPUL/55MOm0reFlxLbtMEVtX2JXy1LONyTrqJgP+DTX2+0ItZDjT7xpC/usGHdFF81 ne35X7CJyc+ikCa+6LCnlsmTaRxjgsA/Obk7RyProtssStKPXCqxxcT6hIue+Zg2z9iu S66n6zIFgRYiEXottLPQRm/SkPyu6zvj+UGDO2SvFcR8/KOXtnRQOQFbR69x/4vYi2l4 BFAKXZUdiAVd6th1NFjgo0A5g8k8ckMd54I5LyNTgZfd2Y1uXgie5RFAwUnhP4w62WKZ QOsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aE2lxw/rNDGPdJ05hPD2uVnr0m8qN8L+coi09dprodY=; fh=teyw1NnyfwD/ohseo7nxCmYkCWalW0Y2MMMQTv6ngSo=; b=hz7JzujY3fhlGB17dkeWnQBp7PBaDLM/BVlG9jD2aUGEXRT+HfXICORNm7D186j76N tyAaFUVFBuOHkkgdklxl81frNjS9wt8qlw58pH4xlO2MuDNBRKipJI7TMqMcDJdfOrPE 9TXghG7tmsJ/gApZsM9BgwItifEGwqO5khlryHdqNqrZKpN0yWeu87Rs1UT6BVmpTDR2 ZjYMLrkmHef5dJzh4ErsSk7pHwt1Wt/GlJBNDU0ZEovPrMRcTAs7CRZhVxynfK1FhByM kvH5/Sg2X17ciTr7K56n4rToXWnCT2d+iqHHqZS09E1KGOG64o21e1BdLm1OSg5nApgW Yp8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=voTdEEAb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id u11-20020a6540cb000000b005b8aef54248si4080568pgp.411.2023.10.23.22.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 22:16:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=voTdEEAb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5C5B68095825; Mon, 23 Oct 2023 22:16:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232248AbjJXFQW (ORCPT + 99 others); Tue, 24 Oct 2023 01:16:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232229AbjJXFQU (ORCPT ); Tue, 24 Oct 2023 01:16:20 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D8B1139 for ; Mon, 23 Oct 2023 22:16:16 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2bfed7c4e6dso60732941fa.1 for ; Mon, 23 Oct 2023 22:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698124575; x=1698729375; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=aE2lxw/rNDGPdJ05hPD2uVnr0m8qN8L+coi09dprodY=; b=voTdEEAbTJR0vwW/o1kox8OsrTmg7U2FoGbx1H5joxsxlF0QSn2NYPi/U52DUXrp1A OeLIhJMp+8cZJwG7Zz0uqmuyCNVq4Q+agqQiYhZpzg9Ng2f51pUOSXjzEjW3TgS6LF7B DVGEuJ9r9XsQWiSLlqF5qpjM4QHZqnjVQSW/KKrMfDqzysdODfqMlhJd+2XSgwdEb8BU xf4o7+2PBgNmMS8QHfnid87w7x6b+0QRFyrZg0kSJt4NiXnCA9H97rqoKw/2q/adYkTi ih8GpeO8r6TS1BskYoWFfY9Cx32Kp2U1h9jD8lpomjamc/S5bqKBSS4KSaH5OhZLKtoE lmNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698124575; x=1698729375; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aE2lxw/rNDGPdJ05hPD2uVnr0m8qN8L+coi09dprodY=; b=CbrYSQEWw27tPdpLXuIDxXs9j9bMWNfpRpEdgPErm+yKFEbx44aZOvk+l50AzRd/iY r1m9bYyrobMML1UKAnMFvAY8l9lfdjk22c81z1kCCgTByvIn/R694nSIvRivp7xq+Q3X ARoBDGw3gEiXpGqaVyim0xJmssdpgLh1I3hsVEZwLjil9QxXroQ7wqtWzPCXAgChOC3y Lea1E+kLHgCd2MXAMsuzHfpktfGS8QK/KVDaR3MPdcTJrhqVIGbdrJUlL1AFvpamClJk hHxk9TLcC/wTWdmImgZdQCvQK4T3nGOKD5YlhlGn5wx3wAY2L8xLBPrhbAb8xzwSCDui RBpA== X-Gm-Message-State: AOJu0Yyz2iP4lD5dwC3J3n+feXDnZa5+1vUwd1PC8CuoyAnl9/Thfkyq gJe4OqMir21I1LYSc4ZYDIgyO4yiNFK9FXcIt5c= X-Received: by 2002:a05:651c:70f:b0:2c5:2cd7:62e8 with SMTP id z15-20020a05651c070f00b002c52cd762e8mr6721518ljb.12.1698124574533; Mon, 23 Oct 2023 22:16:14 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id m29-20020a05600c3b1d00b003fe61c33df5sm15988490wms.3.2023.10.23.22.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 22:16:14 -0700 (PDT) Date: Tue, 24 Oct 2023 08:16:10 +0300 From: Dan Carpenter To: Dominique Martinet Cc: v9fs@lists.linux.dev, ericvh@kernel.org, linux_oss@crudebyte.com, lucho@ionkov.net, linux-kernel@vger.kernel.org, Su Hui Subject: Re: [PATCH 2/3] 9p: v9fs_listxattr: fix %s null argument warning Message-ID: <03a1c530-ac79-4286-9156-b258f79d1fca@kadam.mountain> References: <20231023233704.1185154-1-asmadeus@codewreck.org> <20231023233704.1185154-3-asmadeus@codewreck.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231023233704.1185154-3-asmadeus@codewreck.org> X-Spam-Status: No, score=-0.8 required=5.0 tests=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 pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 23 Oct 2023 22:16:38 -0700 (PDT) On Tue, Oct 24, 2023 at 08:37:03AM +0900, Dominique Martinet wrote: > W=1 warns about null argument to kprintf: > In file included from fs/9p/xattr.c:12: > In function ‘v9fs_xattr_get’, > inlined from ‘v9fs_listxattr’ at fs/9p/xattr.c:142:9: > include/net/9p/9p.h:55:2: error: ‘%s’ directive argument is null > [-Werror=format-overflow=] > 55 | _p9_debug(level, __func__, fmt, ##__VA_ARGS__) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Use an empty string instead of : > - this is ok 9p-wise because p9pdu_vwritef serializes a null string > and an empty string the same way (one '0' word for length) > - since this degrades the print statements, add new single quotes for > xattr's name delimter (Old: "file = (null)", new: "file = ''") > > Signed-off-by: Dominique Martinet > Link: https://lore.kernel.org/r/20231008060138.517057-1-suhui@nfschina.com > Suggested-by: Su Hui > Cc: Dan Carpenter > --- > I've checked this works as expected (getfattr listing all user.* xattrs > after setting some), so let's fix this warning. Awesome. Thanks! regards, dan carpenter