Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp864210rdb; Fri, 20 Oct 2023 01:19:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqxvJKTHfJLY26N5T6fuaoskPA7JqHBdexTeh7E/QM18P2P1/DE0xKLTe7n7qTDn+43wl+ X-Received: by 2002:a17:902:e88f:b0:1bc:2abb:4e98 with SMTP id w15-20020a170902e88f00b001bc2abb4e98mr1110913plg.21.1697789959879; Fri, 20 Oct 2023 01:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697789959; cv=none; d=google.com; s=arc-20160816; b=YpWxG1pdb+hRDOx5DMM6eAh4lNrh2yjY1GaAMqOdkRR2bfSg3P8oRBD4tnvvxuew4H ILQ9lzZSoFpeFEQ6tmq92LieuVB3jf6oh40eCCLaDJXCuGe/5dosVUoy0Y7ExDMyFTZO vLxN9iYKX+7a9jdxOdRSRhtZbPrD2+nPV4vA6RvP9jIjznF347xDtZJ/KBZLWT5bHLJx QO1Y5H59KsWwWwZA5K9dtrKkT/Zs2rKSBiKNfhtsLM26mbfbrb70HixhaKb5eMr4zH7s CwbjH+2eCScoLtahmEkOYwrjqECkKyahqGWoyHmhvr5ft/xAWvfMjABQjY+dFLfCVPif ZlmA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rrKgnqGNwj+/qxrUkjrulP5wLbH/xyHD5bMTIeNaIw0=; fh=GyGZrPRg6rz9taHgIzUSjx/tz50VifwzA6O74SaV9CA=; b=eLgFAbDFmVDniulZmCyIhTFNnB7cQ1RI2S355F5W4YilFgv2lXCUBF6raAguPkAawD eHyUUQ72JLEdcQQLMfF0d0JAJ0UU9Z2E62W0tNtEqXh2Agu4yOqjgLXy8nh7GaJQPZZC DQP+lk7SQHhTOCmepyB6oEuaVdAtx1tG9SHMiO6q1nsOynP00/PEv17+F6JAUYpezC5o spl2zxCXebhSSpi1dQ3+q7J+iYnK4sW+aJoyuTZklnWx75SgRXrc1G+SuM9ud1yIm81g ghCjCOiKMluE3J/uKrr0P8oppot568kea8DFGLkFvF2vRHKcYPwlf0z1LCJfb1Dwp5eF y+Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bSsQLGhC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id f6-20020a170902e98600b001bb993caaedsi1301898plb.173.2023.10.20.01.19.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 01:19:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bSsQLGhC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 151C3826ECAA; Fri, 20 Oct 2023 01:19:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235678AbjJTIS6 (ORCPT + 99 others); Fri, 20 Oct 2023 04:18:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230217AbjJTIS5 (ORCPT ); Fri, 20 Oct 2023 04:18:57 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53A1D1A8; Fri, 20 Oct 2023 01:18:52 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-32dd70c5401so391764f8f.0; Fri, 20 Oct 2023 01:18:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697789931; x=1698394731; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=rrKgnqGNwj+/qxrUkjrulP5wLbH/xyHD5bMTIeNaIw0=; b=bSsQLGhCDhxxA68JFxsZGtEqE7UJdFwW92HwNxuegJPgIf+kl8I9lB5Rlj1bGRUbbJ aQzu/GJ9tQ+GKYF+qefGKhOgoi0PC2zu9HbuqIOKTk/9NKe+hjidH+2d9ECjvAQLhHJv RLAAhcVPAcAAAfy3pPMs3NzBg/u4i2WpWTWoJ25xhHPlgGpEF+jF/vyVw0IDRq7YUglZ suW6JlDu883UC7Y9cOUPNtZuUW5vnc2HBAtOn80qsTt+CwI6HY7QF9oAxAJ93wILhG8W 6H4FRMQqy5GDa1DAPkN1P8lkj+f3sCYOtEscy2kKgx4rSLDejmgNuPwgbZF8lUuByNsh Yc4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697789931; x=1698394731; h=in-reply-to: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=rrKgnqGNwj+/qxrUkjrulP5wLbH/xyHD5bMTIeNaIw0=; b=KDhTJqSFxXFFxPJKJolcVQxPnLzSuitccsix87Z04WzFUCufX/gK3wnLYpYaVGEKKX PFJAayrHi5DJ5Z0ibygkNw77+MIzcmdA8kw6LEMfbV9+Hvan0gKLiwT1d42WUocjmROy u4eydO1uBAbYztkXbcR1vGuY+JMGoQbhNEiqQDzIp7pQjN7ej/gxrPLGZHHwGctdHaLP 52be32/EsdQDF6rCGon/mcxL2uCdbzawd/wJG8MfArz9UD9HDUquAekZy1drVDw8adjF POnYMdonB/36zlU5BCnHTOCFdbKu5FCHowLRz0IiROKjy45isSyjN++ZZAJP23cpSiV4 N1sQ== X-Gm-Message-State: AOJu0YyJcJoBwTSuvLcFMr1riHMsLKvz+6TTm9VxGjyX3/GzG6Yf9zHR cI2PBEUQ0rM5GCu0E0XZ/5xvHZzSkS4AAg== X-Received: by 2002:a5d:6e06:0:b0:32d:a2bb:c996 with SMTP id h6-20020a5d6e06000000b0032da2bbc996mr795933wrz.69.1697789930390; Fri, 20 Oct 2023 01:18:50 -0700 (PDT) Received: from skbuf ([188.26.57.160]) by smtp.gmail.com with ESMTPSA id x12-20020a5d650c000000b0032d9a1f2ec3sm1147613wru.27.2023.10.20.01.18.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 01:18:50 -0700 (PDT) Date: Fri, 20 Oct 2023 11:18:47 +0300 From: Vladimir Oltean To: "Russell King (Oracle)" Cc: Oleksij Rempel , "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Woojung Huh , Arun Ramadoss , Conor Dooley , Krzysztof Kozlowski , Rob Herring , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, devicetree@vger.kernel.org Subject: Re: [PATCH net-next v6 5/9] net: dsa: microchip: ksz9477: Add Wake on Magic Packet support Message-ID: <20231020081847.zgpez76utrexix24@skbuf> References: <20231019122850.1199821-1-o.rempel@pengutronix.de> <20231019122850.1199821-1-o.rempel@pengutronix.de> <20231019122850.1199821-6-o.rempel@pengutronix.de> <20231019122850.1199821-6-o.rempel@pengutronix.de> <20231019172953.ajqtmnnthohnlek7@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 groat.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 (groat.vger.email [0.0.0.0]); Fri, 20 Oct 2023 01:19:17 -0700 (PDT) On Thu, Oct 19, 2023 at 07:17:32PM +0100, Russell King (Oracle) wrote: > On Thu, Oct 19, 2023 at 08:29:53PM +0300, Vladimir Oltean wrote: > > > - dev_dbg(dev->dev, "Wake event on port %d due to: %s %s\n", port, > > > + dev_dbg(dev->dev, "Wake event on port %d due to: %s %s %s\n", port, > > > + pme_status & PME_WOL_MAGICPKT ? "\"Magic Packet\"" : "", > > > pme_status & PME_WOL_LINKUP ? "\"Link Up\"" : "", > > > pme_status & PME_WOL_ENERGY ? "\"Enery detect\"" : ""); > > > > Trivial: if you format the printf string as %s%s%s and the arguments as > > "\"Magic Packet\" " : "", then the printed line won't have a trailing > > space at the end. > > Sadly, it still will. The best solution is to prepend the space > character to each entry in the "list" and remove the space characters > after the : in the format string thusly: > > dev_dbg(dev->dev, "Wake event on port %d due to:%s%s%s\n", port, > pme_status & PME_WOL_MAGICPKT ? " \"Magic Packet\"" : "", > pme_status & PME_WOL_LINKUP ? " \"Link Up\"" : "", > pme_status & PME_WOL_ENERGY ? " \"Enery detect\"" : ""); Thanks for correcting me.