Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3838796imm; Mon, 6 Aug 2018 11:26:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcODLMGoWMF5lXNEJJ5iTedX9aOSiZ88ty9kQCXrQ6seWgP6dXr19L4wB59QJAbds207Iak X-Received: by 2002:a62:591a:: with SMTP id n26-v6mr18300576pfb.94.1533580013134; Mon, 06 Aug 2018 11:26:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533580013; cv=none; d=google.com; s=arc-20160816; b=jb0RTa+/utIl3PmExtwgCYlefaKK3I8COU4CsHAlOcVLG9ktl5LGFUkqJEZ9mYFZbe dq7p5HrD5p+6DcJgJdrKRVn/8I+sSxsCVccVi7HJ42cEa4O5HkLUyEq1jBUGesTOp6WG kmerozuZeY7VkZxD0aUfGQVmVFMij4p335drp1K2XH/cCVu9Gel5mYLW+L5X43d1DLlT 2KbFFVvCtZ797JEji4w9jOYIsKk6+75Bu0P9e2E/3G3ipvnE/MlZbmk/vf3UX6NtIFGN hrmpU6/MXx6L2OM4w0hyfNE38c2XzCzexqxWMbo9IFh3f4ogwaRhxPwTZSOUlhqCHxhk voUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=TZekFXSPAvhU+5cZHpoqls7RjIPEMGfSu8AFOeJCB9g=; b=zLXMnGdI+j0CLvsHnJfXL8cv8iLuo/g7GfcRDnm1L5kkAsuONGcg1DDPW472LPRjfa wDimU3mSk4Z6gZxDoDfcT2QHWPZp8q2Xpn01Y9YUV95WBJZPedgGDX34yeZudnqeuFJG U3vSNIq3rDehd4qFCVDuj53fntDRS+KBjm7J4dBZV1jQbwEoZYVAVIsxi7kkYDxDAkRr z3Eg388mG4zehui4iJNXG/AL/rtNnf9MHKp+vsCvdycny5q2HpTtAxcOlslIE33MTt8k OYJMkPBIFET8+lG+PIrrmeLNcBIc60q/vRvqbeUrylXSWdpIglWrLqTwzbjpCff3IRgH x11A== 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 i130-v6si11406315pgd.691.2018.08.06.11.26.38; Mon, 06 Aug 2018 11:26:53 -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 S1732958AbeHFTxV (ORCPT + 99 others); Mon, 6 Aug 2018 15:53:21 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:55142 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730922AbeHFTxV (ORCPT ); Mon, 6 Aug 2018 15:53:21 -0400 Received: from localhost (c-24-20-22-31.hsd1.or.comcast.net [24.20.22.31]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 4D08F1341DB10; Mon, 6 Aug 2018 10:43:13 -0700 (PDT) Date: Mon, 06 Aug 2018 10:43:12 -0700 (PDT) Message-Id: <20180806.104312.1983555084983717056.davem@davemloft.net> To: laoar.shao@gmail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: avoid unnecessary sock_flag() check when enable timestamp From: David Miller In-Reply-To: <1533527822-3324-1-git-send-email-laoar.shao@gmail.com> References: <1533527822-3324-1-git-send-email-laoar.shao@gmail.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 06 Aug 2018 10:43:13 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yafang Shao Date: Mon, 6 Aug 2018 11:57:02 +0800 > The sock_flag() check is alreay inside sock_enable_timestamp(), so it is > unnecessary checking it in the caller. > > void sock_enable_timestamp(struct sock *sk, int flag) > { > if (!sock_flag(sk, flag)) { > ... > } > } > > Signed-off-by: Yafang Shao Applied.