Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2192322pxk; Sat, 3 Oct 2020 11:16:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKpeo7aaFosbzaMY+ycSm+jRbIio+vPfzeAEbNwLeMqhVuV8CqvZxjS8y380x0wrSmUd4Q X-Received: by 2002:a17:906:1a04:: with SMTP id i4mr7052186ejf.24.1601748960874; Sat, 03 Oct 2020 11:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601748960; cv=none; d=google.com; s=arc-20160816; b=a0t6BW5LPwHpeqllMt7GBqhhIXXpYq9yrTL/NgUoB3quqDxjLFe+JOCclwN7CnTZj6 5cTpybgSv1E1ugRivwb3uWVGEClt2AG3PSvRSS0Gj5eVtI+5VnPrZ8y4Nq9HMeM25HMb /IaYwKTk0h7stKFaEb0mRDTeOoKyJ8Df96u9VzjMrS57cG4AZjpN0F6AJcc7reGhOoER 4KRPfGXdpZnB9+kZv9428Y5Wt1gs0ez3Ma1zFCPZG9pU0MAId04hvyJHmdYQhMjsodMy K5FjZ8BC473QOY4zaQvZD9ci6YBLfkdge/RRfmhkZPRoi6SrYw77OwW1vSFhA/zUhCqm bdRw== 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:subject:cc:to:from:date :dkim-signature; bh=WKaRvvIuGMV9Y9SbY0J9Fqf4v5aSqCYAHGluZJyVI8Y=; b=fcgWCI5D75w/Wwvf1gzo8eG5sW4LoI6dRXp9MlZA8T8NMkpcE4SKsBqqATWzx7Jbwa 0xmhNJ8Qb+Ra7aNQrin8SC6mUg3vBg0H71ZRLapMDjjHAuyLNYQm26K2kshA7rUNc9QR tGnaFthohKx+2iIe5qPD0rh5ypb+aatobpuAzjn2zo6bFczsHKztAwfvLQzDgImIFS8a dWLvWrktl4/DKPg3zgIwRFFwfVaFhtzk8i0Tipk8VoAAlWAX2WeRg5JWV2bijwoNUhm7 HdxGndOc8HXcohOeRc0O9GpmmUMRCCUpJQYlIgGAQYA/8AGgnDsXj/ebeK+9kXeOnQsK YMKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=m8zTfgZ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v24si3581442eju.655.2020.10.03.11.15.26; Sat, 03 Oct 2020 11:16:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=m8zTfgZ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725821AbgJCSKL (ORCPT + 99 others); Sat, 3 Oct 2020 14:10:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbgJCSKI (ORCPT ); Sat, 3 Oct 2020 14:10:08 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3803FC0613E7 for ; Sat, 3 Oct 2020 11:10:07 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id q123so3756667pfb.0 for ; Sat, 03 Oct 2020 11:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WKaRvvIuGMV9Y9SbY0J9Fqf4v5aSqCYAHGluZJyVI8Y=; b=m8zTfgZ5nk9zsbwak/95hsjBMrNTButQ1J5Cb8nADIOZ2+S/Qja97ZlIRUThOFMEpn 80b4Y65Lz9DvoRex/MutNcLqtVYUQ86W0HSClKEa1/O4qcXg7Pn1OLAuliH48TzWtpOs o3nQ7zFB+G0PhCmXvKvL7C3MysBAURfGO9uxOXnnBObYjp4nvRsvLmSHdakiMnc0ltcD 5DOA+Aq3rHA/oFrxHjJfY6+F+Yo0ryRJznFx0SngphDI6k9enN/ldQf/VqV/di0HGmZ1 PpnGaqY0xy+ENWG/uQBFFNyXPCualnpUoFlnef/EByBtxmTi60RiT1ufCfnj0WC3leI9 XTgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WKaRvvIuGMV9Y9SbY0J9Fqf4v5aSqCYAHGluZJyVI8Y=; b=epRgKuj/SvTebju8MfTZwuSB0S4UPZhxTNvKAXMNJuQQ9VZRveWi2RxyHXn1n0RTOe i18TLVD6VAqW8U6IuggpPK3oF5i7ZBOuZfRUvGHusuBiM5NcQ0N12sGfow8h53Zgq/a4 WW8emgm7hA/2JoRAWPflUsBKbUWqrCgy2oKTb8SKitA8OkQZv2VeDgo7fu+l8+sH/JE3 6YsVdpkJtFKtONxsFMvJy6PzQdK8r0LcGE7O7+mDlHl7b+7+CfI11qlfMJTp4FlIypBB +CULXql/mCB5ze2ugtUq9JzdZWFqSV2JTiMInfY3P3bEE6Wdj9LaG6QQqpxGv1SZYbMf xCPw== X-Gm-Message-State: AOAM532pHG6cW/lC7pJmqKsvL5OaskASjbH4tQrhqJt8vLOHYSAgy+aK C4U51Lfmn/0ROP+JHF4DGmARPdC+ke5C6g== X-Received: by 2002:a62:54c4:0:b029:142:2501:34d3 with SMTP id i187-20020a6254c40000b0290142250134d3mr8644081pfb.44.1601748606618; Sat, 03 Oct 2020 11:10:06 -0700 (PDT) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id a5sm5683044pgk.13.2020.10.03.11.10.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 11:10:06 -0700 (PDT) Date: Sat, 3 Oct 2020 11:09:58 -0700 From: Stephen Hemminger To: Xie He Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Halasa Subject: Re: [PATCH net-next] drivers/net/wan/hdlc_fr: Reduce indentation in pvc_xmit Message-ID: <20201003110958.5b748feb@hermes.local> In-Reply-To: <20201003173528.41404-1-xie.he.0141@gmail.com> References: <20201003173528.41404-1-xie.he.0141@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 3 Oct 2020 10:35:28 -0700 Xie He wrote: > + if (dev->type == ARPHRD_ETHER) { > + int pad = ETH_ZLEN - skb->len; > + > + if (pad > 0) { /* Pad the frame with zeros */ > + int len = skb->len; > + > + if (skb_tailroom(skb) < pad) > + if (pskb_expand_head(skb, 0, pad, GFP_ATOMIC)) > + goto drop; > + skb_put(skb, pad); > + memset(skb->data + len, 0, pad); > } > } This code snippet is basically an version of skb_pad(). Probably it is very old and pre-dates that. Could the code use skb_pad?