From patchwork Tue Jun 23 03:09:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 11619673 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 410A160D for ; Tue, 23 Jun 2020 03:09:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 287332078E for ; Tue, 23 Jun 2020 03:09:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="p9HquatY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731596AbgFWDJ5 (ORCPT ); Mon, 22 Jun 2020 23:09:57 -0400 Received: from mail-eopbgr20075.outbound.protection.outlook.com ([40.107.2.75]:36334 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731364AbgFWDJ5 (ORCPT ); Mon, 22 Jun 2020 23:09:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P30Uaxol4ATfn3rQdqcxwolWaEONd4+diAzQBcKisE7NeF2B/tll5QLOiLqxcLQ0VSnPdV/rVFaklQmgB7chY7Y3WP6y2u/QsSAncmCGFlOQpOiVYu/UJBfrqea5YSCES6OG9UOIVs8TlMu2WNKqb/H3kbnoW3HQhI7tg+O6QLaphUtJCx8ZFTlkO7mHt7L+vfCFMLbp0CDB/4XrToqC7NJWduSwSzTR5M5w4b91FSY6uiyUKM66OqEuxpQT/0xG4k+4zoKJsX4G8GUt4K5VlxchP7h2j/BOz9TkVUX/M7WTwSOnDUMjlSX+3LZbC/LSI7Sc4+ElONXrLNHSIv/LnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y2dBEkO4v7+LmtIU3/KEGWtNzWpYV6FN968gI2hHul8=; b=XtK4sWO+ff2gebuWfqdfS5C0BkvvVx+NMwERd5TCYaOScaZXU1XweeKGDRoDUORen1U+55zCHGCZOVP0zFD4YVhVRbNXnIp9cDuu8363kAPYdf1xF8pq6a55UDucvv8mmk1wXiUPp5OCC21j2POFNP89zvEVKIeiRGGPe0BUOQZitYv1UNBhvlZlqjFwEC/wKJOdj6WXPdpXuqbxZcq4BnIrB5iAOSq/06aOLEa9eodDockPL6fyaH07tlCYoPKBKiDOfjTlvxVJcs9xVZi6BP/9zrSniO5oLMwN8ZgBNVP3D+C6zVXRiPdbLbc5M4JuHtTFY+Ibly7YZkT1MNcHpw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y2dBEkO4v7+LmtIU3/KEGWtNzWpYV6FN968gI2hHul8=; b=p9HquatY73M6gX9esSsU/x58MIz/0eNtKRTrXAmqFFpXFDD0dQcjab/l8oLw4nPOrPABFwPzjk4nDnr3DfCdrTg/mxWwnCvYbmk5MmK28M/PloWuyZNa9om4HWwNenRvFlZnRKU7BBi9u6SAniIzqpKpJW/3YbgrVAIoTx9bB8A= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) by AM7PR04MB6854.eurprd04.prod.outlook.com (2603:10a6:20b:10c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Tue, 23 Jun 2020 03:09:54 +0000 Received: from AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::1101:adaa:ee89:af2a]) by AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::1101:adaa:ee89:af2a%3]) with mapi id 15.20.3109.027; Tue, 23 Jun 2020 03:09:54 +0000 From: Peter Chen To: balbi@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-imx@nxp.com, pawell@cadence.com, rogerq@ti.com, jun.li@nxp.com, Peter Chen Subject: [PATCH 1/3] usb: cdns3: ep0: delete the duplicate code Date: Tue, 23 Jun 2020 11:09:59 +0800 Message-Id: <20200623031001.8469-2-peter.chen@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200623031001.8469-1-peter.chen@nxp.com> References: <20200623031001.8469-1-peter.chen@nxp.com> X-ClientProxiedBy: SG2PR0401CA0015.apcprd04.prod.outlook.com (2603:1096:3:1::25) To AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from b29397-desktop.ap.freescale.net (119.31.174.67) by SG2PR0401CA0015.apcprd04.prod.outlook.com (2603:1096:3:1::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Tue, 23 Jun 2020 03:09:51 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c34cf1be-4302-4326-b75a-08d81722e685 X-MS-TrafficTypeDiagnostic: AM7PR04MB6854: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:363; X-Forefront-PRVS: 04433051BF X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iSN00qggVSkQZrnso2uNjjw7Aphj2j8XA/DD6f80Ssb/FCeyp0X/FCv3Uf4G17pY2p72o2hEQJHDlCr6V6a3AnhmEtU0BAN2Lal8k1ie0m/j/Hcuj06J4ObNhheE7USRRZRpCrtBi0xaj+RYEXljbSNEF4s7RC2XhyC7cmwSW+IJ2Bsum8j8KAoEtrw9G8tcIHmvwi2YIchxAi3b+vl7R6ooPovhuvnrsJvZYIxkvwPGnDF5fkPYgIhezs15jVQniUcZk/c3y8W/TPold0A73RV42lOqwBbguK9FC+yCxjLsK6RGKrh+1voqzbtFUUJLGCc+HLD/lb5CFQLaQ0HBmA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7157.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(396003)(376002)(346002)(39860400002)(366004)(136003)(86362001)(6512007)(1076003)(4744005)(316002)(2906002)(66476007)(66556008)(66946007)(6486002)(44832011)(956004)(5660300002)(2616005)(478600001)(26005)(16526019)(186003)(6506007)(8936002)(8676002)(52116002)(4326008)(83380400001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: XWvLXcgfHmqWZN2WTTdidyTjYxQMsLRcvp+QMhrXBVaTYpPx8SU8PaL/HoLikkFOSIVtqvLD2x/CrbT/f8HZIyabI8o0oS6lHLuj8qgNcEw6EfZR7KCDR/oAK6u+wVNYUvAvyM+rQD7eGiQSC2TDYGEtgAhY2KEEOgfphOjSJ2WBSEKQ9XRIAykO2sX5wGoXZ8Lf+Mlx2dgKv+GieH6bEYr15T3M6PHBTRoTYf2VWS0LXds5y/XWD6pCzNUQNBGL6QxRkQEUGFl3NYVuwDClz27YJ2orcGwVszxWpvl44yA90iSZVhC+mC0CBme4WrmyLcOcTJ8OTS6OpY5543GzSfKbfi+03krqIUhgRLScIGkpsYQkFSp+OX6mtqdVyd/9C4+lXbZzUlnVLoY407KjG8wVYGqGE3t90PEEJlhWDTumHI1AXK75JuEkurT4CdweA9DtWp9ryJhf8sPeIqcznSrGYENCxO57Nb9nQzaYB7YTpz5gzynOTJOQhVRYx53A X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c34cf1be-4302-4326-b75a-08d81722e685 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2020 03:09:53.9582 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bT4iWOrVNd+G0LdDNQxwrFOhDe2C1rwqofaRVivThSBM9jjtrXTX/f7M6V1RVMBphh/xj3RkotC+7JoJY9FbsQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6854 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The value '0' is duplicated with USB_DIR_OUT Signed-off-by: Peter Chen --- drivers/usb/cdns3/ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c index 5aa69980e7ff..a2b9af5a80cc 100644 --- a/drivers/usb/cdns3/ep0.c +++ b/drivers/usb/cdns3/ep0.c @@ -610,7 +610,7 @@ static bool cdns3_check_new_setup(struct cdns3_device *priv_dev) { u32 ep_sts_reg; - cdns3_select_ep(priv_dev, 0 | USB_DIR_OUT); + cdns3_select_ep(priv_dev, USB_DIR_OUT); ep_sts_reg = readl(&priv_dev->regs->ep_sts); return !!(ep_sts_reg & (EP_STS_SETUP | EP_STS_STPWAIT)); From patchwork Tue Jun 23 03:10:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 11619675 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD2F560D for ; Tue, 23 Jun 2020 03:10:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A54D9207BC for ; Tue, 23 Jun 2020 03:10:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="jxHZpXLZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731618AbgFWDKA (ORCPT ); Mon, 22 Jun 2020 23:10:00 -0400 Received: from mail-eopbgr20075.outbound.protection.outlook.com ([40.107.2.75]:36334 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731577AbgFWDJ7 (ORCPT ); Mon, 22 Jun 2020 23:09:59 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e77lg6w/Yf6fyhU2J8mGMgKJpH7w+4+9yrCYVkx6Lrs+gYEB21l2bt5FQY/vS3WbURItASBMMiJZnXUktoJEprv6EA8KJj0mnvuN5RlbLwuv+tXgcPkC0tJNd2+ei58PKXgGcgVrOCO8kR5xmtsZeaw1uEQnw6j1AVX53s8ip4Cs39An7MBsQmkkdG33mLVYgh9EQza3Z/J/ahYms//rkgl+H2IMwFiyOwaBBGFE57D+V7DNFxgYFXYFf0Ra0vu0SzU+83N+zosBO6K7HrgtJy9ApNyZxl5Ml+9u92hM6VPG7u5cvkJ8rZ7kHn1AVSF2HLPc3lF8wL4w3lQUcM0E+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Udy1s30FYxaqOXowPF91LqC4LaoXZiuTA7IlNk8gb9s=; b=ICbBgxnjABUgUCc/bP5RXcVu7C2WywZJoZc21SDS0xap3FNPiVM3l7qKCnmOyY+tKRSwlmpQYph8BVUlDAN10NcSeQzvT9O59jxXsCe5X+KalK3azqTaVNG8HnHPKRGIZgWGwQBE158J+K26XxeySlX2hedzTY5S0fJ4LzpzjFEORzTHpnd1eeaHgkC92LcGrS37HKgdt8znqwPhiAFEwjJ0TKDSP7A1iCr/q+P1u/OvLkoixYHr6Qdg7JFL3FdTlYvp/3zFygIvqZvyfWurVNPw5FYMRGpgvz73PdhbgtxNuFQMygqvIUE2+dDw8xSHBEDQ2sUqpAiFra88PiYp2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Udy1s30FYxaqOXowPF91LqC4LaoXZiuTA7IlNk8gb9s=; b=jxHZpXLZnm4SQBO+DIN8O5XryqqDVob/WNc+47GYPxGKtg0KhrZiPIMdzrAtCmxMq2P1SFQyUWGaklZy6HxHhX6ObqHnpb8ins3AozTPH1i564/wAozXIFzUkYERVVtBNAFoThrLtIDr514WBRyBhCicGpx0zHMJ8Xgk4B9wJHI= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) by AM7PR04MB6854.eurprd04.prod.outlook.com (2603:10a6:20b:10c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Tue, 23 Jun 2020 03:09:57 +0000 Received: from AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::1101:adaa:ee89:af2a]) by AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::1101:adaa:ee89:af2a%3]) with mapi id 15.20.3109.027; Tue, 23 Jun 2020 03:09:56 +0000 From: Peter Chen To: balbi@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-imx@nxp.com, pawell@cadence.com, rogerq@ti.com, jun.li@nxp.com, Peter Chen Subject: [PATCH 2/3] usb: cdns3: gadget: unsigned int is dereferenced as a wider unsigned long Date: Tue, 23 Jun 2020 11:10:00 +0800 Message-Id: <20200623031001.8469-3-peter.chen@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200623031001.8469-1-peter.chen@nxp.com> References: <20200623031001.8469-1-peter.chen@nxp.com> X-ClientProxiedBy: SG2PR0401CA0015.apcprd04.prod.outlook.com (2603:1096:3:1::25) To AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from b29397-desktop.ap.freescale.net (119.31.174.67) by SG2PR0401CA0015.apcprd04.prod.outlook.com (2603:1096:3:1::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Tue, 23 Jun 2020 03:09:54 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7ccbfbc9-3d60-4a7b-b2da-08d81722e842 X-MS-TrafficTypeDiagnostic: AM7PR04MB6854: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-Forefront-PRVS: 04433051BF X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hy8coqCO44YqKxTzCTdX1ZYXvzuzmu9wGzIXxgCi860DSUzDb0KdEx2/+5ZztWJ8L+nyGDMxk4c7IHmw7eW/KXDD0Oi/fFHOotbiu4b7Nkt/bFb99cMEHMMSpGeNhbLf5ODiMkyvzPqKY6G3134UIWtjDDExh1KibQSZXB3lLd53AkYdOrwAGHFhktHTkRDTP59YtWJL3cHDFj3nd+c+FrOZXyGXr/XcAVcLOffIDygvs3qmQombXUjRExd60s6K9M+vKKgMM+pn/E/iO0D+b7majncejjnNdlFsLZSpWL5iJWdFElVdmynuOu5V9O/3VU8tgLy6313J5w58hX3u7A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7157.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(396003)(376002)(346002)(39860400002)(366004)(136003)(86362001)(6512007)(1076003)(4744005)(316002)(2906002)(66476007)(66556008)(66946007)(6486002)(44832011)(956004)(5660300002)(2616005)(478600001)(6666004)(26005)(16526019)(186003)(6506007)(8936002)(8676002)(52116002)(4326008)(83380400001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: WA8BzRTihi1nHxu7U4qD6i6XMI3S3sI45Lz3WqiE8iwC/6BjWLJGAd72ciUvRFNwc6ocxOIuyMBeWobj5PsHFJXBPkArpIRmw5xHRPUAOGMA5I/ekiRSGAJ8YC/5Kt3qwwtAFc08rthfS/ic6CWNmf1nZCmRc9eCZkakzZIQxsekfEx5l1YwjVitVSZpczT5AdLDa5oQ3e3k4Ff/i1279eO5UcSq4FXHP8roXByFfWaJNsCSOUXusyKkq4Hze+spbd3QiVrnsjA4A75WoM+zyUc0Rx03QEEM5ow+luI968a6mX/Ig4/SGcOmAo6Ob8x2LmlwXv/Es9N6dc/yWlIdGF2KsqszVy/NCiduQkbwd7KzdCJPnANcECp0FJVgON81/99v3t1Ge4FfiDnBGeY4Ar0YYREK/JTycOLTQ1Z0s9S92Vcu5BwoaWncZqWTUL/6VKlm5WVTVOiaOBvGZLjLXTRuIAw8YAQv+dD1m2Hmo0CRuZTRaca/6U2AwrjkmWZp X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ccbfbc9-3d60-4a7b-b2da-08d81722e842 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2020 03:09:56.8834 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FZX5F7umyCZ/N0MJGajqv5f+ABaBjalFQ+iUJfMO6vj07uAepsGYdWcrhQCXBVJ1bG6+9vuaQ4mz2zmYDzOt7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6854 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org It is reported by Coverity scan, and fixed it by declare the reg as unsigned long. Reviewed-by: Jun Li Signed-off-by: Peter Chen --- drivers/usb/cdns3/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index eac01b1a4958..2362faf7efeb 100644 --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -1813,7 +1813,7 @@ static irqreturn_t cdns3_device_thread_irq_handler(int irq, void *data) irqreturn_t ret = IRQ_NONE; unsigned long flags; int bit; - u32 reg; + unsigned long reg; spin_lock_irqsave(&priv_dev->lock, flags); @@ -1844,7 +1844,7 @@ static irqreturn_t cdns3_device_thread_irq_handler(int irq, void *data) if (!reg) goto irqend; - for_each_set_bit(bit, (unsigned long *)®, + for_each_set_bit(bit, ®, sizeof(u32) * BITS_PER_BYTE) { cdns3_check_ep_interrupt_proceed(priv_dev->eps[bit]); ret = IRQ_HANDLED; From patchwork Tue Jun 23 03:10:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 11619677 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2717914B7 for ; Tue, 23 Jun 2020 03:10:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0EB9A2078E for ; Tue, 23 Jun 2020 03:10:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="pRTOXIYU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731663AbgFWDKD (ORCPT ); Mon, 22 Jun 2020 23:10:03 -0400 Received: from mail-eopbgr20065.outbound.protection.outlook.com ([40.107.2.65]:24290 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731577AbgFWDKD (ORCPT ); Mon, 22 Jun 2020 23:10:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M/mvZe/70gIr4pTgN7qd1NgbhHwBZiYHRgP8Ec61XmUxaNXBKHocDXBzLdwZX72lWJIdL7hh5ywNUw/UbzDkd5kroEPvJBYrC4LC3K1TYPKFsjTf0NenWpkOWRbBJ7jgEUSNkHDVEXYqIbjuBm7xHNibusBFFS+JhF7AzUe/TlvJdcEB/CwFMT1wapxxzmpjkUDcLCFjTQKkLz2SROxb0bSsn1gwqL8CO7EwoxcEfNvwdd7PC67N1kIf5zHsLE47R5BSbcUg/Go1YM+zMGpm+AEcLC3AN9gUZW8bGThT/Y4EDmgnLiDlr9riUjiI7LqgcyYXTxFs62ghk8iR935nKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=98DvoY04b1kLY7SCtg8HEMMGNMVxaIBn0yg26/pUsSU=; b=DIk6/JbxOQqxHERNEqMEYnyrT1G+l0zd++20CmsPuiwodtnmdqVetM64DmUs6ZP85afZ6TLYhY/vVslwwb6K/hNSS3vz5dnzNo3N6rUxClwFhzPz3JppqN5rRBdk4JXqIoi+LBmohFboPlQSI45OWnR0nfXQoMGlzXgLCMFNzIrTjX2MluOh1Kzdd4cYU4b8qFPMMibt+qtq/eRdzGT1wF8XpS5nJHnxbQQwcAcFbhB4LUtlWJGDdrJhOvQ84C/2Jj3rMaasiDg1eE4DWsRQS1kajhkDNTofwb9xUs3b/o2+ttDubNjYagtDaKzvmSJnxGjJYEOpoAZasmOqWajqeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=98DvoY04b1kLY7SCtg8HEMMGNMVxaIBn0yg26/pUsSU=; b=pRTOXIYU/QmNbdliGFwsqSW7teWGiGcPcd7IuLA84WgLN6giJbAeGLvaIxnA+vwYSW5CXw5ndyIzJJHAwbBFACzProCgWUkDtlr0OOJpBWFNlaAnonzZp8dygE3WmjH6wFVspS11SjHRPT4iw/TCj9ZEK/+H6avw2YDQE87Gw2I= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) by AM7PR04MB6854.eurprd04.prod.outlook.com (2603:10a6:20b:10c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Tue, 23 Jun 2020 03:09:59 +0000 Received: from AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::1101:adaa:ee89:af2a]) by AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::1101:adaa:ee89:af2a%3]) with mapi id 15.20.3109.027; Tue, 23 Jun 2020 03:09:59 +0000 From: Peter Chen To: balbi@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-imx@nxp.com, pawell@cadence.com, rogerq@ti.com, jun.li@nxp.com, Peter Chen Subject: [PATCH 3/3] usb: cdns3: gadget: use unsigned int for 32-bit number Date: Tue, 23 Jun 2020 11:10:01 +0800 Message-Id: <20200623031001.8469-4-peter.chen@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200623031001.8469-1-peter.chen@nxp.com> References: <20200623031001.8469-1-peter.chen@nxp.com> X-ClientProxiedBy: SG2PR0401CA0015.apcprd04.prod.outlook.com (2603:1096:3:1::25) To AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from b29397-desktop.ap.freescale.net (119.31.174.67) by SG2PR0401CA0015.apcprd04.prod.outlook.com (2603:1096:3:1::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Tue, 23 Jun 2020 03:09:57 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b287ab7f-0cc5-4152-77b1-08d81722ea0a X-MS-TrafficTypeDiagnostic: AM7PR04MB6854: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3173; X-Forefront-PRVS: 04433051BF X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aTO1fv3fidyqEhG1k9FZPctknxNsrarJSW7iElE+cjz7OxJZjO08gJvkU4vPr+vhM0UUxd4qAe78n9x9KCN8SsMn6At4CpYN1b6p19EPgeEFRSdABMdqNQiBSw9EoaJNH9jhDmR3S15Y1hxN9PquCCfeiSQ1PmlIIR65x7KhVn/nxus5vitmFP1DnPuXBkwV8Jpln6WWRa1bnOpmrsSyj1pCITwcAJkjCkBf7Io0ukzv1FErXlQql7Jf82sXIASV0uBaYjKkauUzYRD490dFwbA7gpsMbxlj945TPxqjUfX5/1nfBLcj/enONT+yPkmoePWDRvxw/D35kIo0L9JC3g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7157.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(396003)(376002)(346002)(39860400002)(366004)(136003)(86362001)(6512007)(1076003)(4744005)(316002)(2906002)(66476007)(66556008)(66946007)(6486002)(44832011)(956004)(5660300002)(2616005)(478600001)(6666004)(26005)(16526019)(186003)(6506007)(8936002)(8676002)(52116002)(4326008)(83380400001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: YNn9MiBNs5iMm0ghFstfmV0FpClrMviERpyNClH/oAK6BQOqd/T85fwaym3gvO7IAb9ZWVm8sxUvNEQ2wsi0mOvxOqd+ZCirk5oELNYMH07wNxmyQHM0v9NzYGO03T+8QxJu7QpEoRMACyLYa60BPQlEsTaQ4e0oLZKZ+MWO5yNs4ovlJC1CIxgQ5aqTrQI6+cps86iRxfCR55K30qy//PH67NMfDMvMuLg6vRbdvQukbCoAtt3sTHHdMCCX5E1O4hrXkVYxsmrmSYIKn7JibMq6nfNyp08ckE0NosRjPvz0YG2d96rROH0/Yc957O23t5mMM1h4DGomEotXJuiqtt654iBFxocuNNFmDEG/xOFFYTZzJADFizxD9h5/r6PyRxzJC8/GnlF3l0KF4iepnY6I4SM+6ZVsLQ3+TDOPZ0Am/vSzEfy6fvdyhGihgOgUKTE7h3T/Pcx4+qdaAkgfcYrqcZ1p/xVa0GR29atf5KziLu3P1QsLHsN85jME0If9 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b287ab7f-0cc5-4152-77b1-08d81722ea0a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2020 03:09:59.8753 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XUUiPGJ9hU4H2W1tNnCdL8sf9yvLBuhgwzgZUqnvnajUGESHM59Y2qmRiqli7LJ43IjIUs9K+5QvuxMpPCPDaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6854 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org If it is 'int', it can't stands for the highest bit for 32-bit number, since the largest 'int' is 0x7fffffff. Reviewed-by: Jun Li Signed-off-by: Peter Chen --- drivers/usb/cdns3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 2362faf7efeb..ecd395397e2c 100644 --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -1812,7 +1812,7 @@ static irqreturn_t cdns3_device_thread_irq_handler(int irq, void *data) struct cdns3_device *priv_dev = data; irqreturn_t ret = IRQ_NONE; unsigned long flags; - int bit; + unsigned int bit; unsigned long reg; spin_lock_irqsave(&priv_dev->lock, flags);