Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp902454ybi; Fri, 14 Jun 2019 05:23:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyK+4hYk+E2eV6Y+OJED2kbFs6Oq5M5goq0gnrCM5L7t1wqAMNDSUSE7tqXcKtOOW1ER7+w X-Received: by 2002:a63:6b08:: with SMTP id g8mr37107417pgc.106.1560514996908; Fri, 14 Jun 2019 05:23:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560514996; cv=none; d=google.com; s=arc-20160816; b=GKzDCXPgA7++otHk5j/hM3hQFpnudBZ5aNsZMIN/j46zhx+3GCEzjctghMtO+bOjXc buMp3IRS6y97E18theIcYZvnJegAeggz0n7IHQA4t3qzd8UhISM/KL+07X3/7sjcIbz4 BLJiUBJgK2ypV0v1PkmxxCZ2/ouzEjG4Y6mFy5Vq9PDKeCI/xsP+lNydYAMCxkS4DM4o Dc2Y02DbZmzklxsmLmittOghV3TJmYMaaNx3Q03WAOR9AvkneipLNglfjgNK+F8CvcBe D93n2ALkZxRPVQcufRYugmIZ8Vuv8giRdGkQ+EdYvQPXRCXVLSOv2AhMFz0mO8WRwerd 0bQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=aFm4pmVNDFOC76N5sWm6tBLHKZkVjrqXpwgMOqg/sak=; b=LvtMOpMq3NLT6AZOhxzZ6Fqwf1A1bsWaaUYEglsCpXoAZml/8/fOWFP6PML4YYvgX9 9Sngv88utKuQ6OKil/rJEiABApvGe2OYpfIrszW76WZMLUr45L509Msl1bx26jBjyAGy jJQTsJIKcmDBZi9WTavIt8M6ORrXbjJqLaVGdRoOtKeVXS7NOb5J/s/w3af+LPGIRkRB FFpuO3MtwQCsdKy+uTw0KeZG0C9AiFmF7pDJG5KBPWyLYPV8LgzRLVOHB4J6VSzTpClV HM49e4w+3CKwQJGhh00viyxQKZoAmPiyfp9p6ydw0nw8mBYTvrRnefIeBRJ3sBujllL7 Ve7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n21si2439797pgl.480.2019.06.14.05.23.01; Fri, 14 Jun 2019 05:23:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727735AbfFNMV1 (ORCPT + 99 others); Fri, 14 Jun 2019 08:21:27 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:19416 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727619AbfFNMV1 (ORCPT ); Fri, 14 Jun 2019 08:21:27 -0400 X-IronPort-AV: E=Sophos;i="5.63,373,1557180000"; d="scan'208";a="309260432" Received: from unknown (HELO hadrien.local) ([163.173.90.224]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2019 14:21:24 +0200 Date: Fri, 14 Jun 2019 14:21:23 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Christophe JAILLET cc: aviad.krawczyk@huawei.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH net-next] hinic: Use devm_kasprintf instead of hard coding it In-Reply-To: Message-ID: References: <20190613195412.1702-1-christophe.jaillet@wanadoo.fr> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-573815791-1560514884=:9068" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --8323329-573815791-1560514884=:9068 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Fri, 14 Jun 2019, Christophe JAILLET wrote: > Hi, > > I got a: > > : host huawei.com[103.218.216.136] said: 550 > 5.1.1 Error: invalid recipients is found from 80.12.242.127 > > However, MAINTAINERS has: > HUAWEI ETHERNET DRIVER > M: Aviad Krawczyk > L: netdev@vger.kernel.org > S: Supported > F: Documentation/networking/hinic.txt > F: drivers/net/ethernet/huawei/hinic/ > > I don't know how this should be fixed (neither if it should be...), so if s.o. > knows, please do. Maybe this person would know, since he is also from Huawei and has signed off on a patch by Aviad Krawczyk: cde66f24c3bf42123647c5233447c5790d92557f Signed-off-by: Zhao Chen julia > > Best regards, > Christophe Jaillet > > Le 13/06/2019 à 21:54, Christophe JAILLET a écrit : > > 'devm_kasprintf' is less verbose than: > > snprintf(NULL, 0, ...); > > devm_kzalloc(...); > > sprintf > > so use it instead. > > > > Signed-off-by: Christophe JAILLET > > --- > > drivers/net/ethernet/huawei/hinic/hinic_rx.c | 8 +++----- > > 1 file changed, 3 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/net/ethernet/huawei/hinic/hinic_rx.c > > b/drivers/net/ethernet/huawei/hinic/hinic_rx.c > > index 9b4082557ad5..95b09fd110d3 100644 > > --- a/drivers/net/ethernet/huawei/hinic/hinic_rx.c > > +++ b/drivers/net/ethernet/huawei/hinic/hinic_rx.c > > @@ -493,7 +493,7 @@ int hinic_init_rxq(struct hinic_rxq *rxq, struct > > hinic_rq *rq, > > struct net_device *netdev) > > { > > struct hinic_qp *qp = container_of(rq, struct hinic_qp, rq); > > - int err, pkts, irqname_len; > > + int err, pkts; > > rxq->netdev = netdev; > > rxq->rq = rq; > > @@ -502,13 +502,11 @@ int hinic_init_rxq(struct hinic_rxq *rxq, struct > > hinic_rq *rq, > > rxq_stats_init(rxq); > > - irqname_len = snprintf(NULL, 0, "hinic_rxq%d", qp->q_id) + 1; > > - rxq->irq_name = devm_kzalloc(&netdev->dev, irqname_len, GFP_KERNEL); > > + rxq->irq_name = devm_kasprintf(&netdev->dev, GFP_KERNEL, > > + "hinic_rxq%d", qp->q_id); > > if (!rxq->irq_name) > > return -ENOMEM; > > - sprintf(rxq->irq_name, "hinic_rxq%d", qp->q_id); > > - > > pkts = rx_alloc_pkts(rxq); > > if (!pkts) { > > err = -ENOMEM; > > > --8323329-573815791-1560514884=:9068--