From patchwork Wed Aug 19 05:48:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaishali Thakkar X-Patchwork-Id: 7035441 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E16C9C05AC for ; Wed, 19 Aug 2015 05:49:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 24398207CF for ; Wed, 19 Aug 2015 05:49:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F1C3204D3 for ; Wed, 19 Aug 2015 05:49:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752605AbbHSFst (ORCPT ); Wed, 19 Aug 2015 01:48:49 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:35650 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752469AbbHSFss (ORCPT ); Wed, 19 Aug 2015 01:48:48 -0400 Received: by pacgr6 with SMTP id gr6so149452783pac.2; Tue, 18 Aug 2015 22:48:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=NEETLV3NwpBxjZqbNy9NJXW6Cn68GQNP3Ks5/w+SawI=; b=DvPxyUbjY+xyscLZwAspp2S1QUeuyfWEjBcE6FB1rEvH3/soiAwyqg5sM7xOgf5Ihy OswfsV++1f/gNyBSjVT62rUED4AJwMnHFjbG1hQrw4vhhSGp/fRE8wGYfX6YVTxqyGhs RpInS+Z2dr9J16IQt5cgG4KQZEPuun26us7UDMlV6NpUTA8vv4qsEycriVKeL8dFjq7C 2tg7VxMzLM5f4dK0oWUKf8ZE4KgK/Ka7FVryqYP2rGmbnwHmy1ogR8XMuDt+fR4fCl6p YexEr8+QtKXc0MfoOEyTTJiTGU1n+dJb9HhJL1mullcuZiYclX2SqartBC7QzGoTCVli k3xg== X-Received: by 10.66.154.167 with SMTP id vp7mr20646893pab.147.1439963328262; Tue, 18 Aug 2015 22:48:48 -0700 (PDT) Received: from vaishali-Ideapad-Z570 ([150.107.241.60]) by smtp.gmail.com with ESMTPSA id fn15sm20121383pdb.50.2015.08.18.22.48.47 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Aug 2015 22:48:47 -0700 (PDT) Date: Wed, 19 Aug 2015 11:18:44 +0530 From: Vaishali Thakkar To: Vasu Dev Cc: "James E.J. Bottomley" , linux-scsi@vger.kernel.org, fcoe-devel@open-fcoe.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: fcoe: Convert use of __constant_htons to htons Message-ID: <20150819054844.GA21960@localhost> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In little endian cases, the macro htons unfolds to __swab16 which provides special case for constants. In big endian cases, __constant_htons and htons expand directly to the same expression. So, replace __constant_htons with htons with the goal of getting rid of the definition of __constant_htons completely. The semantic patch that performs this transformation is as follows: @@expression x;@@ - __constant_htons(x) + htons(x) Signed-off-by: Vaishali Thakkar Acked-by: Vasu Dev --- drivers/scsi/fcoe/fcoe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index ec193a8..d3eb80c 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -364,7 +364,7 @@ static int fcoe_interface_setup(struct fcoe_interface *fcoe, * on the ethertype for the given device */ fcoe->fcoe_packet_type.func = fcoe_rcv; - fcoe->fcoe_packet_type.type = __constant_htons(ETH_P_FCOE); + fcoe->fcoe_packet_type.type = htons(ETH_P_FCOE); fcoe->fcoe_packet_type.dev = netdev; dev_add_pack(&fcoe->fcoe_packet_type);