Received: by 10.223.185.116 with SMTP id b49csp3940010wrg; Mon, 26 Feb 2018 08:32:28 -0800 (PST) X-Google-Smtp-Source: AH8x226rxA4fNQ9BL+9RnfYyjleCewHcjMXF3gXMxhPgfHMB8s7DTRvoJ2IWe9nDb1WH4Vuznhg2 X-Received: by 10.98.79.90 with SMTP id d87mr11095890pfb.41.1519662748073; Mon, 26 Feb 2018 08:32:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519662748; cv=none; d=google.com; s=arc-20160816; b=jmfIYx7BfXoKRr3XSR1bTGyzceBeKNEy+vTqsd36/v14gQdx5X//BWYQXCnV3mNn6G epOD5F4biPSF2WVHqxFewp97fud9fGkEeCveoUKYY6b/PyCfm0KG+12g3yuzz63QtrYT z6+DFgwzepubfM1jt/nWsRvkw+xM6s3Na+glqYip2DABzm/73k5oxuCBdhM1wPd2620L AjnNxS+dR5neOpcAJAo3Pc8VKRC2B7SSw7UpnW1RnXOTQtH5p9mGxlDLow0+sEPfGX2a YKY2DM3FjUicp09bPU9EVDUcmJWStyMVO1BUZsQ3hQN6zRQNEMBWE55moTTK0TWdYnrC KNyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=b9o0381P5mbCouORa63MGwvxpw/uqmNLl6wigNEPzi0=; b=BQU+DgdFf8ISczkxNCQyDvo0mXE7TCvYOQx+3lhwKE0cwIwYf0XW8kjz1iytXTCmjn Dw20vfqfBMnG+lva3I6ZpiHF+2rWXIcgvSRVSAMG41Oa3sC6uGM3OrEONfh7eThk/wb8 sl6sD0b2AIao+X51Xz1nbbeTFXK4r3QcRp25ruOVbsZlmWoPoK7maxBed08WTaLlsvpj zTAtZE8uRhW8BL87x1iVj30RfNla4SPvS83RHvYFGBDZFm9B3AcUFimvu+eBYOX3ULdp 4rgZzDtTzmYxqV6Ma10Op3UcOhN7JRE8orfcA4J9viRWFLUeyrSldT27QBn3RtWk/3iV Yw1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=GmyF4Clg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62-v6si6913163ply.15.2018.02.26.08.32.12; Mon, 26 Feb 2018 08:32:28 -0800 (PST) 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=@nxp.com header.s=selector1 header.b=GmyF4Clg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752046AbeBZQ3s (ORCPT + 99 others); Mon, 26 Feb 2018 11:29:48 -0500 Received: from mail-he1eur01on0052.outbound.protection.outlook.com ([104.47.0.52]:38994 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750877AbeBZQ3q (ORCPT ); Mon, 26 Feb 2018 11:29:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=b9o0381P5mbCouORa63MGwvxpw/uqmNLl6wigNEPzi0=; b=GmyF4ClgyciLTmVIVtFs75SyCkJuI28nqJ+0sR99LypmejIBlrmrcxy/R6EOHl9F441kXddMB7dwUUDP/IbBHJmT7OGLHFSdzsQw4v8ku0eG/6iUB2qQ5cXu1+DNzv7Uip+wqXSLcVxR9l2BwQ8cgf5s5iUHcaV33ApWwjU9emE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ruxandra.radulescu@nxp.com; Received: from rhuath.am.freescale.net (192.88.168.1) by DB6PR0402MB2696.eurprd04.prod.outlook.com (2603:10a6:4:94::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Mon, 26 Feb 2018 16:28:24 +0000 From: Ioana Radulescu To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, roy.pledge@nxp.com, laurentiu.tudor@nxp.com, bogdan.purcareata@nxp.com Subject: [PATCH 1/4] staging: fsl-mc/dpio: Fix incorrect casts Date: Mon, 26 Feb 2018 10:28:04 -0600 Message-Id: <20180226162807.20649-2-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180226162807.20649-1-ruxandra.radulescu@nxp.com> References: <20180226162807.20649-1-ruxandra.radulescu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.168.1] X-ClientProxiedBy: DM5PR10CA0018.namprd10.prod.outlook.com (2603:10b6:4:2::28) To DB6PR0402MB2696.eurprd04.prod.outlook.com (2603:10a6:4:94::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 200e2994-cd03-44e8-6661-08d57d35f648 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:DB6PR0402MB2696; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0402MB2696;3:matKbCasCjZ3cZNG9HpsvgXZ9v6gXIW4rKUcRiBq/1qJJvWNVxRMtxUKOhEK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BVlywl0MZnPRtdv7rK/AV/WqAaMWsfTwfWVvjX/pyOK9YCK7s938vBM9ZGybKHhHVok6SQ//Mp4QDMK/CXeQ6GDG7oy2jH+b9Ab72UOYNxEk30T0WkCweRONDmkhf+u/aZfxPimyYsssbyAzMBu39FBVJFHSgkEv2dZjlrP5e4b6qYPh1xFitXV4tbBaknta0dsEmuosI14kJSzIMsC97hvWvJXoWLsA9jzuYbRRyJy0qZ22TMBy1AmIDcqT+MHOT8QvgVa7DVbnoOgW8zXNLvQhmlwlXdfyQ7;4:/uHYR//d1cfLfIT+FeBYrcXgYANOhWr2V61QSDvKfowG2ABIciSzCzvf35+jFH7Ykla81u+VsFOLfhpxmEHx+6nzS2TovQw1ZQX66c/BB8aqFcscRVi92So/J5buR73wiK9rCMzHAAEUXzgXFK8Y1gAgqqoP13xFjGUqKU2kdaavc84PX7j152kEDWpVmLvPF8OhYTSNQoZUZ8qKxGpw7BhQ2yjeBMQzyHJwDs2QfJU5jEV5pOEcpywFUhnvENaXpriyFVTf0nwdj+goJzqVhoCN1w1KOEQ980qfv6owKoO13qy3ZwZpIB8lUOX72EpQ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040501)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231220)(944501161)(6055026)(6041288)(20161123564045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:DB6PR0402MB2696;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0402MB2696; X-Forefront-PRVS: 05954A7C45 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(39860400002)(346002)(366004)(39380400002)(376002)(199004)(189003)(2361001)(51416003)(106356001)(50466002)(26005)(16526019)(478600001)(316002)(186003)(105586002)(52116002)(305945005)(7736002)(16586007)(81166006)(25786009)(97736004)(5660300001)(2351001)(86362001)(2906002)(8676002)(2950100002)(6666003)(66066001)(36756003)(4326008)(6486002)(47776003)(6916009)(53936002)(48376002)(81156014)(59450400001)(76176011)(68736007)(6512007)(8936002)(386003)(6506007)(50226002)(1076002)(6116002)(3846002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0402MB2696;H:rhuath.am.freescale.net;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DB6PR0402MB2696;23:w3i4qgfh8Y8oZcu66vCqk+k3/1YuPrqCUTD4Wyx?= =?us-ascii?Q?00FkbVLwFMFveGEX9oRxnNZoF5tUKkcsyzg5vNo56mZaxuiZ+Z75Jirsj03E?= =?us-ascii?Q?C1XoQOzS6YeNt246H+dsrKkBk/WyCBZYG7DYm1R1fRBQFUuDNtATapylkH9S?= =?us-ascii?Q?guwSTQ10GLqTSzBQkFbICkrsGr6DPWnTk5olGFLq99HowUD818dgKXAJifUm?= =?us-ascii?Q?lMrm/wZaY6s8HwA/kKJNOlP5cx3XYXtvZhav1ZYamJUXjMcY1usU6df+hp1N?= =?us-ascii?Q?KomN7JF5Le00xvTXNo1HBIiGuhcWUsBLlfcGES+HTGNJ2rE8pkUDxn5ebjCN?= =?us-ascii?Q?mp9ScK2+NesTkitwb/wUjpQAgFDWutXFgAY0eA9NK99/uyRixJIs5y2K3jol?= =?us-ascii?Q?UKNrO48ZmoV4WtdOknWNnRfaanlV8Qc9w+gy/QQGwEK3xHs/9qIzHncf+mzi?= =?us-ascii?Q?E5W4RWFjClI0xqV6v/NyYwfVyhh+uYrP9ecXjMgDeAyaPCT7pEX5iJSdK0HN?= =?us-ascii?Q?4tveSfdZUoEXF8GwsbNodiQjFuGsZkkxeBMlmc2aMz0hJPXZSDEPObGtoMid?= =?us-ascii?Q?VA2ldRptQ1UlaNf2EXvP8Rg953H/3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Po+Zi4qxukSOi8pFIi8VsUdlT+Lyz7oM5/ndNGacsUwz8pwEkCqk=;5:qAYqXb7HDelLlrlPwEtxCCM1YuHN3lBbnvJUV8n485QRT+z0ezOzcrYakbJagSLAlZD/00wz1eIw/j4BzOJL86jpGrqosfCOWiiqZriax2oYmziNpJYPKqb2OWaaq+3cX3oY1WXrxWJNoxpf0+vJyUNhrmtlRRP5X+0E0uAavjo=;24:a//oWV4oQtKFhZfjEy0+rDqQfJp5FYZmIvm3mxLQ22Ab8CyWpEx1cu3v0LS83pTKpwMkAM51Tlk/SVku8gpVJBFdRIWOaSBfWp+bB27vvsM=;7:UkDgP6EN4AXJPXZ4JlE8c7kawNN8de6c1t9VKe1ySGJ2o+CXRB6qmFFDHxEPxhCaa1F9Zk6Fuq33OeklmtebOF4lGEiyZHcaXeMc8YX1L0CMLlAHUb+OLJxfk4RU0igdCahCUjqSIJrZn5xgnDEb/4t+++qAV5lwjwGHeMy0iIBUpHIg9bGREN3lKCHv8n+a2z36OVCIfr1zUF9uFzjW3WfgQOvVb/XWIwPMqtCReGq8Ne64h8gylzYBbypvM44m SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2018 16:28:24.9284 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 200e2994-cd03-44e8-6661-08d57d35f648 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2696 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The DPIO driver incorrectly assumes virtual addresses are always 64b long, which causes compiler errors when building for a 32b platform. Fix this by using explicit casts to uintptr_t where necessary. Signed-off-by: Ioana Radulescu --- drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 4 ++-- drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c index 1acff7e..14ed2be 100644 --- a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c @@ -192,7 +192,7 @@ irqreturn_t dpaa2_io_irq(struct dpaa2_io *obj) u64 q64; q64 = qbman_result_SCN_ctx(dq); - ctx = (void *)q64; + ctx = (void *)(uintptr_t)q64; ctx->cb(ctx); } else { pr_crit("fsl-mc-dpio: Unrecognised/ignored DQRR entry\n"); @@ -237,7 +237,7 @@ int dpaa2_io_service_register(struct dpaa2_io *d, return -ENODEV; ctx->dpio_id = d->dpio_desc.dpio_id; - ctx->qman64 = (u64)ctx; + ctx->qman64 = (u64)(uintptr_t)ctx; ctx->dpio_private = d; spin_lock_irqsave(&d->lock_notifications, irqflags); list_add(&ctx->node, &d->notifications); diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c index 376e9ed..f57c151 100644 --- a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c +++ b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c @@ -497,7 +497,7 @@ void qbman_pull_desc_set_storage(struct qbman_pull_desc *d, int stash) { /* save the virtual address */ - d->rsp_addr_virt = (u64)storage; + d->rsp_addr_virt = (u64)(uintptr_t)storage; if (!storage) { d->verb &= ~(1 << QB_VDQCR_VERB_RLS_SHIFT); @@ -590,7 +590,7 @@ int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d) atomic_inc(&s->vdq.available); return -EBUSY; } - s->vdq.storage = (void *)d->rsp_addr_virt; + s->vdq.storage = (void *)(uintptr_t)d->rsp_addr_virt; p = qbman_get_cmd(s, QBMAN_CENA_SWP_VDQCR); p->numf = d->numf; p->tok = QMAN_DQ_TOKEN_VALID; -- 2.7.4