From patchwork Tue Jan 12 10:06:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zhen Lei X-Patchwork-Id: 361156 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp220180jap; Tue, 12 Jan 2021 02:09:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCl2PN2xcj3cBMKCJapDB9qxv+uxUUzWgaprApNewNGaOrv0JQrCLwRDpLwrmfwN4sxv3/ X-Received: by 2002:a17:906:cd06:: with SMTP id oz6mr2685074ejb.25.1610446144935; Tue, 12 Jan 2021 02:09:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610446144; cv=none; d=google.com; s=arc-20160816; b=1H0yRpH5s6gePnpy8RaQsC3PYFMHyFW7J3cHZLqdcg9E0pvVfOJDcU5OBwnNp8To3r ZIXrCnM39uimFZ5VdCQnaIj9k17DGd8m1dnAZfe3Vn6cA1068j/hVs8WiF0sgKLNboLx 0oX6H5UEUSOAdHcgc1gxqeyOafriITzdCSHRPYsM3zvh56THfule8gz1nSuf2dmDvR8m JT7Tv6GTY79db6/Igt5CxQUNHfrzYAScY9C7GLjrEiWqnB+H3j60wHXSzH2uI+qjxzqu ByWqAcTD9/XhFOFGLUgGUjHJz6GagfSkLGn53MgrH28KH5Vvuhz17UjgM4IaMuiOKMDP 2cUw== 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 :message-id:date:subject:cc:to:from; bh=MkpZ8ce5P+/5NXmhUOaVJSoMDwuFdJRndjkd50m7+Y0=; b=Uh0VbFm6a8KQFW3Cg9pkr6KyTGvRhG61txxSKDdXHnx4k0b3AXAm3/tOZMnOeB6hSq zY/NjGIy2jZSyTSSaNz62vQuxE8R5M3vsAi99dfos72CA52Yjo4OEmK7Nwox710N7T4G ma+3LWteBYZ/eIvZIXjm3kNXfU9oPkFdHvSZbmcfmfDMgh6a1AeJ4MGxwkgmtwb/6xKQ 30w6r/SbkM3WZJZuMJo2ax2oa24ABOzjApQFzEGlHykBNva5EYveM42MJr76WJwjuXmy SkHxvO6SXHsvbIZo8ijRBXE7/6y7xfErp6LFUVfMgo6bOrX99D98hqZIAo2rAoMBY2RJ WF3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-spi-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 e15si1109402edr.313.2021.01.12.02.09.04; Tue, 12 Jan 2021 02:09:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725877AbhALKHn (ORCPT + 1 other); Tue, 12 Jan 2021 05:07:43 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:10957 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390366AbhALKHm (ORCPT ); Tue, 12 Jan 2021 05:07:42 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DFR6q1NPtzj5PB; Tue, 12 Jan 2021 18:06:11 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.176.220) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Tue, 12 Jan 2021 18:06:49 +0800 From: Zhen Lei To: Mark Brown , linux-spi , linux-kernel CC: Zhen Lei , Yanteng Si , Pratyush Yadav Subject: [PATCH 0/1] spi: cadence-quadspi: Fix a compilation warning for 64-bit platform Date: Tue, 12 Jan 2021 18:06:36 +0800 Message-ID: <20210112100637.747-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.176.220] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org This patch is based on the latest linux-next. So the Fixes commit-id maybe changed when it merged int v5.12-rc1. For details about the problem analysis, see the patch description. The auxiliary information is listed here. 1) the type of size_t on 32-bit and 64-bit platforms include/uapi/asm-generic/posix_types.h: typedef unsigned long __kernel_ulong_t; #if __BITS_PER_LONG != 64 typedef unsigned int __kernel_size_t; #else typedef __kernel_ulong_t __kernel_size_t; #endif include/linux/types.h: typedef __kernel_size_t size_t; 2) The compilation warning information on arm64: In file included from ./include/linux/kernel.h:14, from ./include/linux/clk.h:13, from drivers/spi/spi-cadence-quadspi.c:9: drivers/spi/spi-cadence-quadspi.c: In function ‘cqspi_direct_read_execute’: ./include/linux/minmax.h:18:28: warning: comparison of distinct pointer types lacks a cast 18 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) | ^~ ./include/linux/minmax.h:32:4: note: in expansion of macro ‘__typecheck’ 32 | (__typecheck(x, y) && __no_side_effects(x, y)) | ^~~~~~~~~~~ ./include/linux/minmax.h:42:24: note: in expansion of macro ‘__safe_cmp’ 42 | __builtin_choose_expr(__safe_cmp(x, y), \ | ^~~~~~~~~~ ./include/linux/minmax.h:58:19: note: in expansion of macro ‘__careful_cmp’ 58 | #define max(x, y) __careful_cmp(x, y, >) | ^~~~~~~~~~~~~ drivers/spi/spi-cadence-quadspi.c:1153:24: note: in expansion of macro ‘max’ 1153 | msecs_to_jiffies(max(len, 500U)))) { | ^~~ Zhen Lei (1): spi: cadence-quadspi: Fix a compilation warning for 64-bit platform drivers/spi/spi-cadence-quadspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.8.3