Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2580999rwb; Mon, 19 Sep 2022 07:09:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6j5LvAKfG5l7SHlCwDt14y66Jmc0I5crIQA0u33I3w1xJVUwAv/Kp7KQOloSW1/XESAXGm X-Received: by 2002:a17:906:8a65:b0:781:8378:f52a with SMTP id hy5-20020a1709068a6500b007818378f52amr1385256ejc.113.1663596549252; Mon, 19 Sep 2022 07:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663596549; cv=none; d=google.com; s=arc-20160816; b=TK0nC7P+hr9ukkdd9sAsYl8HdQbaR0Odofu+pGQXQlxCJ6d7Vqbl3Re4ZDRUEAulm0 S9szZzyz0Po0GfvHsuEVU6hwNa9fnuywq0hfsHnN53D0fg3QIg2M6Qg8fuedLoGV6Bn9 oP2u9v2hIVSwutpuPKyvig7lQK0qxZKVlZb96eXL0auXzIQQmPZSPlSCxW5jJFl+tFg8 iaa95mKC7y6JBg5UMPa2noZfuJMpEfZnGn63MWHl8cRzNkRjqAJ8cBWZAmnGaRN9ynF9 4x3+XKf+flizJbFGjtiGyrFkBwOYRWXW6BWUUtQERpJJKodRIS/cbD+K8ohUcpRBlD5m a0Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=5lJX44e/GcLFLEflSkL/jPuHYKPuY5PHBkqq8KnwltM=; b=IzngeHGaad/9oQCaKUwPB1BAGCfhCwm32rY5EjeAxOAHL0XaBOx7c/J2UTng5+nUEO 4or+tt2GuSjll0vbW3SOlLc+oLMxOoFYJyZhp4LmI9vyMB0W/JKntAtWvLU7q401bX1P z5OI9MpX6qpNTm6gskyBv6sNbcbKLZVcHrPx3O3KYAri1Vmweio2cq4btU+atzRPvdZr D5yNAt6mVmcZBrv0Scgpmvd92g3ROjLDju2x+1HG0ERlqRwlPEGqCrartPFLV2tFuQ0X H9lJt+WvtzClq0jjvzdzteDuR65dKlfbD2UdMyBLqz8YWyI92ZR3oeRvcQkgJvw8GlSw draw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a1709062c4c00b0076daf135b26si20765815ejh.791.2022.09.19.07.08.42; Mon, 19 Sep 2022 07:09:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230452AbiISNXy (ORCPT + 99 others); Mon, 19 Sep 2022 09:23:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230335AbiISNXv (ORCPT ); Mon, 19 Sep 2022 09:23:51 -0400 Received: from mail.sf-mail.de (mail.sf-mail.de [IPv6:2a01:4f8:1c17:6fae:616d:6c69:616d:6c69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 975C92CCA7 for ; Mon, 19 Sep 2022 06:23:50 -0700 (PDT) Received: (qmail 14798 invoked from network); 19 Sep 2022 13:24:11 -0000 Received: from p200300cf070fe30076d435fffeb7be92.dip0.t-ipconnect.de ([2003:cf:70f:e300:76d4:35ff:feb7:be92]:34684 HELO eto.sf-tec.de) (auth=eike@sf-mail.de) by mail.sf-mail.de (Qsmtpd 0.38dev) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA for ; Mon, 19 Sep 2022 15:24:11 +0200 From: Rolf Eike Beer To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, Sean Anderson Cc: linux-kernel@vger.kernel.org, Zheyu Ma , Nick Bowler , Sean Anderson Subject: Re: [PATCH net-next 11/13] sunhme: Combine continued messages Date: Mon, 19 Sep 2022 15:23:46 +0200 Message-ID: <14992029.3CObj9AJNb@eto.sf-tec.de> In-Reply-To: <20220918232626.1601885-12-seanga2@gmail.com> References: <20220918232626.1601885-1-seanga2@gmail.com> <20220918232626.1601885-12-seanga2@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1735805.g2cWb5fM6b"; micalg="pgp-sha1"; protocol="application/pgp-signature" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nextPart1735805.g2cWb5fM6b Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Rolf Eike Beer Subject: Re: [PATCH net-next 11/13] sunhme: Combine continued messages Date: Mon, 19 Sep 2022 15:23:46 +0200 Message-ID: <14992029.3CObj9AJNb@eto.sf-tec.de> In-Reply-To: <20220918232626.1601885-12-seanga2@gmail.com> MIME-Version: 1.0 Am Montag, 19. September 2022, 01:26:24 CEST schrieb Sean Anderson: > This driver seems to have been written under the assumption that messages > can be continued arbitrarily. I'm not when this changed (if ever), but such > ad-hoc continuations are liable to be rudely interrupted. Convert all such > instances to single prints. This loses a bit of timing information (such as > when a line was constructed piecemeal as the function executed), but it's > easy to add a few prints if necessary. This also adds newlines to the ends > of any prints without them. I have a similar patch around, but yours catches more places. > diff --git a/drivers/net/ethernet/sun/sunhme.c > b/drivers/net/ethernet/sun/sunhme.c index 98c38e213bab..9965c9c872a6 100644 > --- a/drivers/net/ethernet/sun/sunhme.c > +++ b/drivers/net/ethernet/sun/sunhme.c > @@ -330,7 +331,6 @@ static int happy_meal_bb_read(struct happy_meal *hp, > int retval = 0; > int i; > > - ASD("happy_meal_bb_read: reg=%d ", reg); > > /* Enable the MIF BitBang outputs. */ > hme_write32(hp, tregs + TCVR_BBOENAB, 1); You can remove one of the empty lines here. > @@ -1196,15 +1182,15 @@ static void happy_meal_init_rings(struct happy_meal > *hp) struct hmeal_init_block *hb = hp->happy_block; > int i; > > - HMD("happy_meal_init_rings: counters to zero, "); > + HMD("counters to zero\n"); > hp->rx_new = hp->rx_old = hp->tx_new = hp->tx_old = 0; > > /* Free any skippy bufs left around in the rings. */ > - HMD("clean, "); > + HMD("clean\n"); I don't think this one is actually needed, there isn't much than can happen in between these 2 prints. > @@ -1282,17 +1268,11 @@ happy_meal_begin_auto_negotiation(struct happy_meal > *hp, * XXX so I completely skip checking for it in the BMSR for now. */ > > -#ifdef AUTO_SWITCH_DEBUG > - ASD("%s: Advertising [ "); > - if (hp->sw_advertise & ADVERTISE_10HALF) > - ASD("10H "); > - if (hp->sw_advertise & ADVERTISE_10FULL) > - ASD("10F "); > - if (hp->sw_advertise & ADVERTISE_100HALF) > - ASD("100H "); > - if (hp->sw_advertise & ADVERTISE_100FULL) > - ASD("100F "); > -#endif > + ASD("Advertising [ %s%s%s%s]\n", > + hp->sw_advertise & ADVERTISE_10HALF ? "10H " : "", > + hp->sw_advertise & ADVERTISE_10FULL ? "10F " : "", > + hp->sw_advertise & ADVERTISE_100HALF ? "100H " : "", > + hp->sw_advertise & ADVERTISE_100FULL ? "100F " : ""); > > /* Enable Auto-Negotiation, this is usually on already... */ > hp->sw_bmcr |= BMCR_ANENABLE; Completely independent of this driver, but I wonder if there is no generic function to print these 10/100/* full/half duplex strings? There are several drivers doing this as a quick grep shows. Eike --nextPart1735805.g2cWb5fM6b Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSaYVDeqwKa3fTXNeNcpIk+abn8TgUCYyhtYwAKCRBcpIk+abn8 TvVeAJ91F4hWkWpO9XheZpyJjHFLNBXP9gCeLBuiqlPLLsMyu7mUbZrevXOXdAQ= =3qv+ -----END PGP SIGNATURE----- --nextPart1735805.g2cWb5fM6b--