From patchwork Sun Jul 21 14:20:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 169315 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp6405351ilk; Sun, 21 Jul 2019 07:20:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqysqsngNuyHMIYYE9+YHrQKyvTs2iHZzRUokpdElkztCcC399t7GUzlDHtvoJmbAmHV6j37 X-Received: by 2002:a17:902:830c:: with SMTP id bd12mr71624662plb.237.1563718851521; Sun, 21 Jul 2019 07:20:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563718851; cv=none; d=google.com; s=arc-20160816; b=cv3+2Ls9IdvkZk0/BBgbBOpBPhAdRVYJzzRFB94WLyr2SYXOnfmlIrZDITOI0D2k1d GAWs/gCNNw2gSUfB7+I62I993aqcsfFVindMHaTrukxscCfaGE4Q9oEgkUSoJ3y1q/xB jiFxogiK2XYeWR6V9/2CGu0fvxTfTtEgX/FPfxAFl+ZXGpTywLJwUNML/EwkFMlDGXZd Fx9S1MHSAN8L303KaLT90DyGmY6ES1LTt8Lt7KhZHQQdiSgrJJXb1pGD6pIaT1ypoF45 9PEZgttu2njEfcVjNNPlq1TqDnVOYUpoEAH2H/sNX4jx3iAvBhW17YDMOfPTHbC9AZDp kiIA== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=INW7SCnphIh64rKSIwbrY/qZ8SWy5OEFjQ4zyy+PpsQ=; b=kRw2kxVA3wSVePZ6SoJeZSIoOfLKS205lwHbVFTxkkANJnY8Y6O0awdT/q4Lvc/1/P kJnKMEsOs94hjljA+OTP3mV8ltN3TvXrXBvEbCtPNMAFEApIQo/QwvmwaZ8RTDfiTexq 3C8wXZbIqpboRVj0BgdLKej+BFHUK/J0skZjr0UN5Vp6xmIaFF1ScaH1/7LQrXWs9rAe lpAFDerf83d78fYQxZW2F0MDpzIoIxNeibc1sdujyYBPM6Sau/ZOZx7TM3LuGE44FrgV ZY5RgGb5cOi46AC0bvN0spxTAZlZHIjHUuajmpYxLE5EATdgigU3S2pR4Y7wdvPhMwGW 5xXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ewuXmkw9; 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 a63si6595126pge.113.2019.07.21.07.20.51; Sun, 21 Jul 2019 07:20:51 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ewuXmkw9; 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 S1726575AbfGUOUs (ORCPT + 29 others); Sun, 21 Jul 2019 10:20:48 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:56825 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726366AbfGUOUr (ORCPT ); Sun, 21 Jul 2019 10:20:47 -0400 Received: from grover.flets-west.jp (softbank126026094249.bbtec.net [126.26.94.249]) (authenticated) by conuserg-12.nifty.com with ESMTP id x6LEKI7X003650; Sun, 21 Jul 2019 23:20:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x6LEKI7X003650 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1563718819; bh=INW7SCnphIh64rKSIwbrY/qZ8SWy5OEFjQ4zyy+PpsQ=; h=From:To:Cc:Subject:Date:From; b=ewuXmkw9gCY1AIMc9CtzUh1bKWUq0Cl9q7iY6K8vkPjC9ZUOHUsou94wSbRfDIGu3 7T8UubFc1ye5OHJ/UgoOWk1/MkpD5l8v3UMzZBRTMxH9pNkehBC5wEGmZp9SGUYGL7 6En8ujq1fduPX2w1G9cMTVGRanmHrjLSGRddtkTgAROfmJbBW8rP1hXQy83IhQiHEh PuLGO28qVwyTRssQYNYxWqDNbuxp0OJEqd7VefuYUWGwNn02hhtd+TGxekKu0rH6P8 fEVc50sJ0lETHt9onHljNbL0320jqxjI8wEbBY5RX9YFfdAB+rtABY22lPZUI22sX+ MmhRHPNraXmLw== X-Nifty-SrcIP: [126.26.94.249] From: Masahiro Yamada To: Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-s390@vger.kernel.org Cc: Greg Kroah-Hartman , Arnd Bergmann , Masahiro Yamada , Harald Freudenberger , Martin Schwidefsky , linux-kernel@vger.kernel.org Subject: [PATCH] s390: use __u{16, 32, 64} instead of uint{16, 32, 64}_t in uapi header Date: Sun, 21 Jul 2019 23:20:08 +0900 Message-Id: <20190721142008.30093-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to make sure they can be included from user-space. Currently, zcrypt.h is excluded from the test coverage. To make it join the compile-test, we need to fix the build errors attached below. For a case like this, we decided to use __u{8,16,32,64} variable types in this discussion: https://lkml.org/lkml/2019/6/5/18 Build log: CC usr/include/asm/zcrypt.h.s In file included from :32:0: ./usr/include/asm/zcrypt.h:163:2: error: unknown type name ‘uint16_t’ uint16_t cprb_len; ^~~~~~~~ ./usr/include/asm/zcrypt.h:168:2: error: unknown type name ‘uint32_t’ uint32_t source_id; ^~~~~~~~ ./usr/include/asm/zcrypt.h:169:2: error: unknown type name ‘uint32_t’ uint32_t target_id; ^~~~~~~~ ./usr/include/asm/zcrypt.h:170:2: error: unknown type name ‘uint32_t’ uint32_t ret_code; ^~~~~~~~ ./usr/include/asm/zcrypt.h:171:2: error: unknown type name ‘uint32_t’ uint32_t reserved1; ^~~~~~~~ ./usr/include/asm/zcrypt.h:172:2: error: unknown type name ‘uint32_t’ uint32_t reserved2; ^~~~~~~~ ./usr/include/asm/zcrypt.h:173:2: error: unknown type name ‘uint32_t’ uint32_t payload_len; ^~~~~~~~ ./usr/include/asm/zcrypt.h:182:2: error: unknown type name ‘uint16_t’ uint16_t ap_id; ^~~~~~~~ ./usr/include/asm/zcrypt.h:183:2: error: unknown type name ‘uint16_t’ uint16_t dom_id; ^~~~~~~~ ./usr/include/asm/zcrypt.h:198:2: error: unknown type name ‘uint16_t’ uint16_t targets_num; ^~~~~~~~ ./usr/include/asm/zcrypt.h:199:2: error: unknown type name ‘uint64_t’ uint64_t targets; ^~~~~~~~ ./usr/include/asm/zcrypt.h:200:2: error: unknown type name ‘uint64_t’ uint64_t weight; ^~~~~~~~ ./usr/include/asm/zcrypt.h:201:2: error: unknown type name ‘uint64_t’ uint64_t req_no; ^~~~~~~~ ./usr/include/asm/zcrypt.h:202:2: error: unknown type name ‘uint64_t’ uint64_t req_len; ^~~~~~~~ ./usr/include/asm/zcrypt.h:203:2: error: unknown type name ‘uint64_t’ uint64_t req; ^~~~~~~~ ./usr/include/asm/zcrypt.h:204:2: error: unknown type name ‘uint64_t’ uint64_t resp_len; ^~~~~~~~ ./usr/include/asm/zcrypt.h:205:2: error: unknown type name ‘uint64_t’ uint64_t resp; ^~~~~~~~ Signed-off-by: Masahiro Yamada --- arch/s390/include/uapi/asm/zcrypt.h | 35 +++++++++++++++-------------- 1 file changed, 18 insertions(+), 17 deletions(-) -- 2.17.1 Signed-off-by: Heiko Carstens diff --git a/arch/s390/include/uapi/asm/zcrypt.h b/arch/s390/include/uapi/asm/zcrypt.h index 494c34c50716..8c5755f41dde 100644 --- a/arch/s390/include/uapi/asm/zcrypt.h +++ b/arch/s390/include/uapi/asm/zcrypt.h @@ -20,6 +20,7 @@ #include #include +#include /* Name of the zcrypt device driver. */ #define ZCRYPT_NAME "zcrypt" @@ -160,17 +161,17 @@ struct ica_xcRB { * @payload_len: Payload length */ struct ep11_cprb { - uint16_t cprb_len; + __u16 cprb_len; unsigned char cprb_ver_id; unsigned char pad_000[2]; unsigned char flags; unsigned char func_id[2]; - uint32_t source_id; - uint32_t target_id; - uint32_t ret_code; - uint32_t reserved1; - uint32_t reserved2; - uint32_t payload_len; + __u32 source_id; + __u32 target_id; + __u32 ret_code; + __u32 reserved1; + __u32 reserved2; + __u32 payload_len; } __attribute__((packed)); /** @@ -179,8 +180,8 @@ struct ep11_cprb { * @dom_id: Usage domain id */ struct ep11_target_dev { - uint16_t ap_id; - uint16_t dom_id; + __u16 ap_id; + __u16 dom_id; }; /** @@ -195,14 +196,14 @@ struct ep11_target_dev { * @resp: Addr to response block */ struct ep11_urb { - uint16_t targets_num; - uint64_t targets; - uint64_t weight; - uint64_t req_no; - uint64_t req_len; - uint64_t req; - uint64_t resp_len; - uint64_t resp; + __u16 targets_num; + __u64 targets; + __u64 weight; + __u64 req_no; + __u64 req_len; + __u64 req; + __u64 resp_len; + __u64 resp; } __attribute__((packed)); /**