Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755712AbbFONeM (ORCPT ); Mon, 15 Jun 2015 09:34:12 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:47580 "EHLO e06smtp11.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754292AbbFONeA (ORCPT ); Mon, 15 Jun 2015 09:34:00 -0400 X-Helo: d06dlp03.portsmouth.uk.ibm.com X-MailFrom: ingo.tuchscherer@de.ibm.com X-RcptTo: linux-s390@vger.kernel.org In-Reply-To: <20150610110144.GA3249@vaishali-Ideapad-Z570> References: <20150610110144.GA3249@vaishali-Ideapad-Z570> Subject: Re: [PATCH] s390/zcrypt: Convert use of __constant_cpu_to_le16 to cpu_to_le16 X-KeepSent: F084B8E6:E39F8680-C1257E65:004A3D02; type=4; name=$KeepSent To: Vaishali Thakkar Cc: BOEBLINGEN LINUX390 , heicars2@linux.vnet.ibm.com, Julia Lawall , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, mschwid2@linux.vnet.ibm.com X-Mailer: IBM Notes Release 9.0.1 October 14, 2013 Message-ID: From: Ingo Tuchscherer Date: Mon, 15 Jun 2015 15:33:52 +0200 X-MIMETrack: Serialize by Router on D06ML044/06/M/IBM(Release 9.0.1FP3|January 12, 2015) at 15/06/2015 15:33:53 MIME-Version: 1.0 Content-type: multipart/mixed; Boundary="0__=4EBBF4F6DFD9BB928f9e8a93df938690918c4EBBF4F6DFD9BB92" Content-Disposition: inline X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15061513-0041-0000-0000-000004C577DC Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9950 Lines: 225 --0__=4EBBF4F6DFD9BB928f9e8a93df938690918c4EBBF4F6DFD9BB92 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: quoted-printable Thanks for bringing up. I pushed the patch into our internal repository, it will be upstream so= on. Mit freundlichen Gr=FC=DFen / Kind regards Ingo Tuchscherer Software Development - Linux on z Systems IBM Systems &Technology Group = = = = = Phone: +49-7031-16-1986 IBM Deutschland = (Embedded = image moved = to file: = pic03543.gif) = E-Mail: ingo.tuchscherer@de.ibm.com Schoenaicher Str. 2= 20 = 71032 Boeblingen = = Germany = = = = = = IBM Deutschland = Research & = Development = GmbH / = Vorsitzender des = Aufsichtsrats: = Martina Koederitz = = Gesch=E4ftsf=FChrung: = Dirk Wittkopp = Sitz der = Gesellschaft: = B=F6blingen / = Registergericht: = Amtsgericht = Stuttgart, HRB = 243294 = = From: Vaishali Thakkar To: Ingo Tuchscherer/Germany/IBM@IBMDE Cc: BOEBLINGEN LINUX390/Germany/IBM@IBMDE, mschwid2@linux.vnet.ibm.com, heicars2@linux.vnet.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, J= ulia Lawall Date: 06/10/2015 01:01 PM Subject: [PATCH] s390/zcrypt: Convert use of __constant_cpu_to_le16 to cpu_to_le16 In big endian cases, the macro cpu_to_le16 unfolds to __swab16 which provides special case for constants. In little endian cases, __constant_cpu_to_le16 and cpu_to_le16 expand directly to the same expression. So, replace __constant_cpu_to_le16 with cpu_to_le16 with the goal of getting rid of the definition of __constant_cpu_to_le16 completely. The semantic patch that performs this transformation is as follows: @@expression x;@@ - __constant_cpu_to_le16(x) + cpu_to_le16(x) Signed-off-by: Vaishali Thakkar --- drivers/s390/crypto/zcrypt_pcicc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/s390/crypto/zcrypt_pcicc.c b/drivers/s390/crypto/zcrypt_pcicc.c index 4d14c04..9f18876 100644 --- a/drivers/s390/crypto/zcrypt_pcicc.c +++ b/drivers/s390/crypto/zcrypt_pcicc.c @@ -98,11 +98,11 @@ static struct ap_driver zcrypt_pcicc_driver =3D { * - VUD block */ static struct CPRB static_cprb =3D { - .cprb_len =3D __constant_cpu_to_le16(0x0070), + .cprb_len =3D cpu_to_le16(0x0070), .cprb_ver_id =3D 0x41, .func_id =3D {0x54,0x32}, .checkpoint_flag=3D 0x01, - .svr_namel =3D __constant_cpu_to_le16(0x0008), + .svr_namel =3D cpu_to_le16(0x0008), .svr_name =3D {'I','C','S','F',' ',' ',' ',' '} }; @@ -164,7 +164,7 @@ static int ICAMEX_msg_to_type6MEX_msg(struct zcrypt_device *zdev, }; static struct function_and_rules_block static_pke_function_and_rules =3D{ .function_code =3D {'P','K'}, - .ulen =3D __constant_cpu_to_le16(10), + .ulen =3D cpu_to_le16(10), .only_rule =3D {'P','K','C','S','-','1','.','2'} }; struct { @@ -251,7 +251,7 @@ static int ICACRT_msg_to_type6CRT_msg(struct zcrypt_device *zdev, }; static struct function_and_rules_block static_pkd_function_and_rules =3D{ .function_code =3D {'P','D'}, - .ulen =3D __constant_cpu_to_le16(10), + .ulen =3D cpu_to_le16(10), .only_rule =3D {'P','K','C','S','-','1','.','2'} }; struct { -- 1.9.1 = --0__=4EBBF4F6DFD9BB928f9e8a93df938690918c4EBBF4F6DFD9BB92 Content-type: image/gif; name="pic03543.gif" Content-Disposition: attachment; filename="pic03543.gif" Content-transfer-encoding: base64 R0lGODlhVwAeAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwMDcwKbK8ER3u8bGxv///wAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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B92-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/