From patchwork Fri Jul 22 06:25:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 593255 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7AE6C43334 for ; Fri, 22 Jul 2022 06:26:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234135AbiGVG0B (ORCPT ); Fri, 22 Jul 2022 02:26:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbiGVG0A (ORCPT ); Fri, 22 Jul 2022 02:26:00 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 149297E007; Thu, 21 Jul 2022 23:25:58 -0700 (PDT) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26M1YFuO024876; Fri, 22 Jul 2022 06:25:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : content-type : mime-version; s=corp-2022-7-12; bh=Gnp1G5eDmDAKOtKSGwTf7mbuU+MIncH1NaogSnqegkA=; b=qpv3xoCPhpNwnQ9PIwn2S8id7eR6ImoxZptubLynHjyBNnUj57ljwwCayAuhJ2NFOpia OyTCcRqiErXu7PXtIMU0QECKq/ljNV4F/HrazHpMsDpUfIKEm6J1Zb4Wp6G1CRKtQ+Wg v4mTGkoCYMFEMFr/XaxW3gAnh9k8QoNH/TyMh4CoFoEqbOQ/2FxGI8+FkiDWgDmup5L8 bOS8fY2AUeN0suZ4wKbWX3W+Pkb7Ud4epvQ+XQLtkcK7ZTbNjBMybJpTapx3+CsaIXxo cQX5uS7kBIUJl4nvgsG2fBjTowxouhRhKDrvZeLdqNYlSUJE+Je+e0i1rPt5zS6HEbWQ Sw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3hbmxsefx0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Jul 2022 06:25:54 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 26M21pAv022262; Fri, 22 Jul 2022 06:25:53 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3hc1huqehn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Jul 2022 06:25:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oPTNXTtWnMRH0d9hDnjjmSxXjjdSuXBqWa+ImA/xxvCVPK+QGZQRwbkMhp5LdtX3H3bEHRW8Se9RCn1eJuNKpBa3zlPYrrVlLmvJiPacd/Ng0PHlo/QPRKnmE9B6I8USVowT9JNPMLkpsiYvt7gZyN+3d2jIhO+Juz1dKVwJUI2bHRbtpEZgtX0Df0gunzeQczmj3UoTNoHebz5QMzbHhtfr8vqBbSCXZvLo132GrR6k9ijipeYbl4FJVldpvlMp+/In4A5qt2Y34qiKgservt8iSQAyqGaJY50RQruL/474PQxjj9LJngG0Nel4zi2vWC9fOZgx0fJoJwZztAmrQA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Gnp1G5eDmDAKOtKSGwTf7mbuU+MIncH1NaogSnqegkA=; b=COsyPnM5PFdcgecD3F2+JEcb7PofCND8Xu1exkLoKoLkUdnLxZVKUtiaDBGiBHozHwupsF0WZEpYAbcTCInkrbJHUo5SGQ1b2+SSgaU4+rUCWrbKklR8491hfcARDZc6rOCe2h7HzyOYWHgIIz3gZVu7h9NdP5SfpjWds78TcVpKcnVNpxqNll2cJ81OZ/v30LDzaCqB31FeWVoHvfKBbJyZ4QKKFgPT2Xjz9BZopirHYkpXSIJB2JUPErUjHD3U1RqBDCVfm6jbcoJhpp6rB/2shwzIhfGDQ9rDbxcdvhApcG9QCLnMad2JLcM4spu7VE8GZxw22PJEh7Y/qWG9rg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Gnp1G5eDmDAKOtKSGwTf7mbuU+MIncH1NaogSnqegkA=; b=semVo7Xx6hAfEU4r2CtJ8QKDv91TV/d6IIXg9aUetFTyeoDgcjBmvLAE150jQw14mvhUicmfsrZnJUKFfIUJOlVC1tFdqHvLWzljffSS1CmesEr7IzvDRKsLgiBQkh/N3ig9DOpl24J69csjYc3wowAPSukHOBKNld+1Rke66cQ= Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by SJ0PR10MB5744.namprd10.prod.outlook.com (2603:10b6:a03:3ef::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Fri, 22 Jul 2022 06:25:52 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::24dc:9f9a:c139:5c97]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::24dc:9f9a:c139:5c97%4]) with mapi id 15.20.5458.018; Fri, 22 Jul 2022 06:25:52 +0000 Date: Fri, 22 Jul 2022 09:25:42 +0300 From: Dan Carpenter To: Heikki Krogerus , Xin Ji Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 1/3] usb: typec: anx7411: Fix an array out of bounds Message-ID: Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-ClientProxiedBy: ZR0P278CA0029.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::16) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 56efa058-bbbd-41eb-4bb6-08da6bab068a X-MS-TrafficTypeDiagnostic: SJ0PR10MB5744:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qWZu5p+Po2LXI8wHYJMnGpIDB0wwozCuyPjdf6PAI6o28Q+AoQjZUvhr5W2LPkm7wePDstJ2AsAifwoaKkR3h1IW0XbAFAPeD+uIcBOKO7Of6loF2JgKz8DPa/Lj1B9U90svqdTxCFEOB+Os2faORYa0rfyog7zn9fhGNJIXCgpTb4ZOCoSf7QSksQhovML9fQtQXGn4lUTSSAlqgHsqFh1ie+3G/R99wdiCabcBmy0cb6PsnLCqyvw25KAR8dEG5asTfZ5UyPLN7PaWDyMiHAKFHA4wZJYMkfkr3czbX0xgskcTlagM6ObfaV5PHeSTN01auGxP/yZGK/ydoaD4z9j+FnbozwgJ0khESra0W+y3hE9laeZzFLUpHSzet5fvlKWrEeLKVFuJ5ULaQyV/n9eFIJT4vY1GKcvBxrbh53wowK7nVeVn/fZiyYgdBEWljepgQgY2ByE7VgauZ2mSFN4T1uNuBzgVYRneSxvM4Xlzxsxvd/MYdwaZbjhrKSyR4F09laqRwIebZPnSu2/7ZRTzhMD8fnBOvlrk/NX+gmxd4nNC+qRrjWYyidb770MADYUC5+/cVkoCTjcuyimSYbexmKlIV3uDX6//kCqmXuS0lhucKGwxFMj63lbPopsQFAAFrj9qPW9paLCMHVDobFUa++JWXT5+Ggi86msuMjFGBDnqFU0SnRB0x4lAp9zAWw2ARQ22puo52LLOnOTibKfRYq4UFaGRnVpwYEyquRuiROCNmgm3KPnNLCOxBAxxMCS+uciwigyWNAU9dNZOLH/+tzk/9Y2TviGDEJL6+eYnaUa1yy7MKoxIyfewP6gJ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2365.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(7916004)(136003)(366004)(396003)(39860400002)(376002)(346002)(33716001)(86362001)(38350700002)(478600001)(6486002)(38100700002)(4744005)(44832011)(8936002)(316002)(5660300002)(66556008)(4326008)(8676002)(110136005)(83380400001)(186003)(66476007)(6506007)(6666004)(41300700001)(2906002)(26005)(6512007)(52116002)(9686003)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8ZKkgRgCQCxv8shF3K+lyaTQHMjtlmset70lH/1tNcvvFGYLGg/8luCnFiGciJdxHbpAXhip/e1Zfq6o4yT97Oi+P+/0AaGKCDv5UGExp9ORTDsm3YdGs+cJnOHHUSFihAVAvcxfAzc9/fro/lOCZ8/bWlzKu+Nq6vctYFBi2KIZmwc8y+da1yvq1m74iC+WhRVJ9+9t+rexypZ/wai5reDYwUcoBFq2uS7lXvanV/dcfnSBJh1jBBjo1SIDQg/QNpkupGn32TNOt6WHkzgsR8FholGJ0EwhCvRyAm+wDcn8uurAqmHzljIqmcbx9R/JIDCydeOFRiTNyzNv1e46cCaNsZ65vjy3ZAkgt+HNDUdaO6B4QZe6FT0WAU73l5OVNFu3u6P1AEUiqluGJLrWeOQfsDyCLVWbGdrDu2xSj87IyotdWtmKLFUF6fKruzyHdFi34tkkV/eP+4ErwQVpIIt/KkjhzjB8wJQUbEzC15rreJxeGEjMwuh74YNWdWbtmT+vH5sEtEu9uDDRxJm28+8eVdjgHiQ3R0SjZQtaEDCXyIEEL7J9ExHTKUW0Znz9Bc4IoSW3ELNzVqQco0y5BFKt61k+QonBBMJ6Nt0hFo0hMJcgpwjA/5AVqTgF62IgSBcZG2BOvmPYv2m1hp/+X3IUA6Dlck5CbKdgffy6ahaO5ZhtVQqXp23zOZg+RFGkk3sH3VQSvjgnVHLvDFD/s5Ts6WjYLGA7XDSw/KBph9t1FG8/1/HOuLtfuOG4QT5tCh/NmDx144aeCV99TpnRKHhyBvYQa0wVE6SFLHpztLwDgLmyfwks3sPDlQL8Su2QD97JdigBpBmtNiX0kg/oQ6mF9ZnSt6okht6JMR94y2bjVpwBU2HAX1FAOOUj6iHzhADwSlnBFIspyT4F5E7uAdcUPiCj3VtSXL4t2sJHcb0Ou72+WdAB7NFpM12O+T1Di925G8tGmHKGDvDXiju2FA65I7SnjHsJbnP2esalMC2hW9iCrxXDHNwejWSYoyL/t+0wiPqQV1nsE+WrlITAGcvJD1/fzI1In3EhXm8ztUCJnwe8RRr80mKCSNnFKIOoSfNzt6aOPueduI3dNAxtKexbXVH4VPvFnHJEqif/w6sQcja6+3QjtOeXfwm6LDJeLSnmfQ1qiEMsEYtEof/jEZcfHJJQhKKqzitU3FmhKPx1CiG2y6sKxa1ZNVrtQ9t+KRyXZ2ys0qqq197ALakkjP3lo2ATMjxn7oIGVTarqYXajlgQHADPYaOxtgYrtT/SA890tsg3TBZayufJXb+lCqsIEMoU8AMz96qTwZ3Lw+c6pQnQadmSSXxtSgMuffJ62EtqLy8VUF5vPJltXKEO6slGrlD/e/kli52fQsyFFma2lgfrNofRph4JlRQ0Kg2+6GNw60/1NiMV1V4tQAxXmU+bammtc2tgNNrrwVOTbMg+s8H8Cz0UB9lQgMvW49yidnXLX+CmHE0CZAMmYfkv1JKeYuSBjObVZp0hEdHYMSNeQawsqfEHhz70+DNUjT+zo0lScEWpNjwY8rgXDsZMFQfCY21d/TGXbLbZfUJ1dxw+xANutM7jdE++GBMKJS4wZfCLtixXuoTTvyn9WdsYDA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56efa058-bbbd-41eb-4bb6-08da6bab068a X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2022 06:25:52.1996 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GV0XVKkfSfXzXp1r/PNh1CAIlHFLff4bRNy9g05CR+VCptYhj4k3ruc3THslhh6DcysSZiBa1BqY6c4LyeszS5lrUZp11SUcY9U5w0Y3VyU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5744 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-21_28,2022-07-21_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 malwarescore=0 mlxscore=0 phishscore=0 mlxlogscore=999 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207220025 X-Proofpoint-GUID: UeDjDRYcAPP8khjr0mFm2aZhWc-sJIW6 X-Proofpoint-ORIG-GUID: UeDjDRYcAPP8khjr0mFm2aZhWc-sJIW6 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This should be ARRAY_SIZE() instead of sizeof(). ARRAY_SIZE is 4 and sizeof is 8. Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support") Signed-off-by: Dan Carpenter --- drivers/usb/typec/anx7411.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/anx7411.c b/drivers/usb/typec/anx7411.c index b990376991f8..4f7a5cc968d0 100644 --- a/drivers/usb/typec/anx7411.c +++ b/drivers/usb/typec/anx7411.c @@ -992,7 +992,7 @@ static int anx7411_register_i2c_dummy_clients(struct anx7411_data *ctx, int i; u8 spi_addr; - for (i = 0; i < sizeof(anx7411_i2c_addr); i++) { + for (i = 0; i < ARRAY_SIZE(anx7411_i2c_addr); i++) { if (client->addr == (anx7411_i2c_addr[i].tcpc_address >> 1)) { spi_addr = anx7411_i2c_addr[i].spi_address >> 1; ctx->spi_client = i2c_new_dummy_device(client->adapter, From patchwork Fri Jul 22 06:29:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 592786 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E47CAC433EF for ; Fri, 22 Jul 2022 06:29:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234088AbiGVG32 (ORCPT ); Fri, 22 Jul 2022 02:29:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbiGVG3Z (ORCPT ); Fri, 22 Jul 2022 02:29:25 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8C7886C24; Thu, 21 Jul 2022 23:29:23 -0700 (PDT) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26M6Sqod002651; Fri, 22 Jul 2022 06:29:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : content-type : in-reply-to : mime-version; s=corp-2022-7-12; bh=f8jxfe30XavxzMCVq0BSZ4xR1PtVGlKuKTTJfVqeqeI=; b=22obiOxh2vjsA3S6RNZE9N5hMrv1q9pG8T608iR6b7DFcAP+69r8l51wn8oSBawqOBwW ibnIQ2/IVGWX4vgz7C1tqvin6ZMvYwPWlbFsvirluN8J8shD3V21V+lHPgWC4GiIeuoV UbQTfP5mn66i6T8pOBUB520cO8fBkUqz7l/7xX0wDbkj5LLDT1ccdrknIyIWgPQetzJZ 8vDxKB4SkfYg+svqJqvOWG2OvLsw726bWBuZ0K7JYsbydENxgKmdeFasaCdyo27c4U8Q M0EH4m8NB5TIWEzsfYd0l0mPfmXW/tqFgX/mWsVfANNyrL4ep1y19NDBe47//HQ3SweM Ew== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3hbm42pje3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Jul 2022 06:29:20 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 26M3K0Rd002589; Fri, 22 Jul 2022 06:29:19 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2172.outbound.protection.outlook.com [104.47.56.172]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3hc1mdxnhj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Jul 2022 06:29:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IL6DVXoUGduIZVbhhqqt6gXS8x8L3CoBQXEenXAVC1s552ZYN4r8RIT3j8JrfRJLn0uNxPMskGO4GbVf3EqlfU4E1KDUY6SjGkQdiR0Bjp+HlWIpeF1MWpM8aBTu+LSIprfgeLgqQXZ+2pQWTa+sk7DTHuUpYd07SlCZM2r4WJ/wyAIdsbdUk7aIQeT248Z8VSoMqCANXHmBoTT8LEQ4+yBOm2BEJCP1uZgMynMCWRyLdoidZq2H7lzC85Qd92qNgr5gjoGceu+9lK8FA0XHJNL72E9leubKOZDj3SBUtbFWtQeq9raHXJcq1QBB8vw80PXEWbCDtu7lWxkv5DaR6w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=f8jxfe30XavxzMCVq0BSZ4xR1PtVGlKuKTTJfVqeqeI=; b=afIXOgHXpO+l9UJR1Htcpks1rKCF9F0bvQepV7oo9JNTiIbOvsxUX5sfHQjO9GWO+UsE+YcQgznT18CaMPFzMy35Ag3mBcdI8yaO2VvaY7ZIK4aXYzX7B+d2t5ruDoI94QYqn1oyA+Sb615FhKvn4vi4mHkDxy6eCnQ2V3BKCGVltM9d/EnQTORDHZ+UBhAxernXF92reWHE3ZURFKqQywz9UcKRXkaIjD3MQ0jwYS+iOZ+dwqwxIb3qrwtJigClnKGjbn24BHE4vO86SM+/dNJRIZq21siW32M+tvL8CC94HXEYaqJEPE60FM9Co4dps2mts61WCVBlQXsrxy1XlQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f8jxfe30XavxzMCVq0BSZ4xR1PtVGlKuKTTJfVqeqeI=; b=tgRXKN4WL/2oA0ltqR+HJ+Vc7JDWF6uKj+S79BmNJVa/TdSx+mt7asGsozFjr3N3BRGVPz6O8PQwhg9/89qkwg4egXj1FMrxJqra9F0dh93PFNMx6TG+/6S2z0jXlYf8og5YP8eVBkLypFZ9kqwpajCrCMIEs/priSdnWFBgT8U= Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by SJ0PR10MB5744.namprd10.prod.outlook.com (2603:10b6:a03:3ef::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Fri, 22 Jul 2022 06:29:17 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::24dc:9f9a:c139:5c97]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::24dc:9f9a:c139:5c97%4]) with mapi id 15.20.5458.018; Fri, 22 Jul 2022 06:29:17 +0000 Date: Fri, 22 Jul 2022 09:29:07 +0300 From: Dan Carpenter To: Heikki Krogerus , Xin Ji Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 2/3] usb: typec: anx7411: fix error checking in anx7411_get_gpio_irq() Message-ID: Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email haha only kidding X-ClientProxiedBy: ZRAP278CA0018.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::28) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0780796e-5116-4bb6-102e-08da6bab80fb X-MS-TrafficTypeDiagnostic: SJ0PR10MB5744:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0XU9bVFKNHj6zEw+wgtOY21Y0O6zrr2uMsVI+AF/mNrJONskNYq2i3Jye0mn63Js6ZAh5KsIots6fge2LxyY5lZX9eoY5Ec/tVc9cSaCJEpE9NQSLuyyhP8MWfd22DEk38cgBcdraVqlL+8OzEIN6kpGMYm2dRCFqimB9Z7udJMxD8mqtsdFcct7U8ruRB2TlQugrKf8g22Rz/YVLT/TOtjco9rlAe0ild0kp5HkdtuFIvWhh8vr76KyOE6OFLuWM3aC3Kdag7iKmxha5Mfttve+UxzG3wwkNEkao9EvagKOgR5AnYMX9VOk1D2LmoaZ6qC1+TUlD/Rv2Rb+XT1xPs27yNUDdf+yHDggZSqhfsNtZI1+faQETpFEWAWFd9afYMrCDoGuSgRYLmqG7FwMcqcHgGDf25OYQAtI59LEK4aUaGULWyDwBTARfdmDgw4GaTDe0vSuMlyn0EfoTrrRwE+9KlUwgRkxPoNNM1Jxtipwoz/FuWiyrggMIme407Rc/AcgrCvlzmCRtIIRScGOWcR32HAb1ZQRkmAZTNncFWatPMmTqfQmwGQJq0PsrT+wEwxLItFcT7nl4w8s1YjmWNbFq/g8bZWbFQZ+J5Cxgzyt1kucB1fIDZh1XWDwAXF9syb0Hzq9KlfZciTbpgbXNO1l/sndHcv2x8J7+ARv4PxJtLoVJtaNZq7FuWD5/NPsKYjF/EG74GXtusHRdFr4DYTquKyE1TD/xJhMtYPnHMbR+pwomVVMG8fGXy+xbmhG0BeewoJ0fjorbzABT2y6aSeEHoYqzKf2ehL3Ml+2bnih9+IFjV3a4g4/7wk5D6EI X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2365.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(7916004)(136003)(366004)(396003)(39860400002)(376002)(346002)(84040400005)(33716001)(86362001)(38350700002)(478600001)(6486002)(38100700002)(44832011)(8936002)(316002)(5660300002)(66556008)(4326008)(8676002)(110136005)(83380400001)(186003)(66476007)(6506007)(6666004)(41300700001)(2906002)(26005)(6512007)(52116002)(9686003)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cBXmUcZLxEhkmgHWSNpMh5dGUuH23ndhVmcXBpD5f0EHEEIOm5uFM9HgLtabLk5zaukBJbEVSbKC00EGFfnZXQf07bpNvdtIHQ7dQnbk4AKAbblmsp+FMXY0btmQrXjnNEC1v1P/MbJ2xpm3hTp6eB2pBFCZ0RxIZ4QNfXAoRBgwydtNwO1wPD1kxa2WgRnsn1JWtzKVg0XQmaV3fpJXykqsW6tfhs4FrQ3IiLOUtdt0A51HL/Ntt2YWOF+R0W6HcVJdJjHCdJyZ7enL4tNuWaAJ+hiWslvEy2guMw1MZElbcODyVKGz0w6lifosc0bSZUo6bdTbCfaG8HQTke+bR6hL7lJO3HWjoHXyybkrwZ0O9BNlDl0eZaD8Hx75ePGJfrDqUcP5heZy0SQm2gJMnaDq3hGhMn8G+Szz1pv2D+E2LBBvg5S6m5DRb41ZRM5GJfdYtsFFTTB7ldqd6rWPxPnj3xzDagB8KAW0RHP2NhlD6lSvhOVs8ju9ldmclcc0PistwXTlz6HSDeGZ83kPwRfVHW/szXepRHTrpwUSiL0Iz7huU0jce+KO2KldI+lGHjzVD27s5K4jnGLkfP3MPuaM+vvPNia/L+NqO4HDnsl782XQEImwKyr3VBNfbYkGIYhXuktvCfY9Cdk8k5Xl6LUqIoDojVlL0io8wE03bFIkVpIKv2tf08v3137yyIo485IMQvgJ7PTf3Xm2+pVourBlaeJ1kA2tx1s7Up6MGsMUcuOpV1rGtWIBPM3WZLdvRILCiRQv06ov7Li7vQizFHGkmMwkU9/pfWXIWLOnig8LIzkyoJIT9N7jJeqnuwjJmChE9HiMP/jdidweaGa87g1ql7l8wVQLTnIh2iDFCzycYpylaOBVZNMhMQdtwsk6WGe9IFAYXVa5DptcDuTHWrWA39ho9gLheyXabJy9BsZco3htuFCPOoNh1p7d3t5VAXxHv0qx95Pt176gjGQ5uvEGnUvflcKm/ev16gf98EfcfFtXJ+Aynz8kf5vyryWorSTc/CDfn9JAnRKjxLoWk6fqwA5c/H/i49PjkWZn5uud2GrTXrNayEK1KmmbgLQqRMRyPhpI9/2VCWAw8/aZptbcIIzOwl4r80m5rJyTEaJ7b21cSJMiAkfkKpfMpIdi1XCb7IttQ1FCnuAPbtIM0eZXOZShPWIu9x/ZG2PXT39/mFRARQfx3wCkvl1RJtGIOXfWW0nJ2ef0Sqe/U5qZdYrPqFHSjx/CvyjFovMwfH6DXqI94hTqmGqW35Aw4SFBDo9GmimOiltHSbk8k9TVIp5oU6M3FOGEg7PwsnkHyaDBhAl1uvPwxVh7ai4lrvNyZs0mcc9H0NA4xFERA28ZUqERPtt8iiy8bn5pjMznhgLRgqvHAnbRgWWrCfk5kD3HZ6fGg+zJ+84ufO6P4gJAYQVGLyNBc6JOozeBWA8/nnaDpd2szRtYCU0KOWSAQBovnAOzV5w4Ki/CTFOiBGBMy/1nOv/GcqtMlMzUp1+o6PccVX59i0TkXQxn6sM3Nb1kGYeHzrtpy0lVvfEgWLcrzjOZTR8s8+YKp1luV5eLyULSdE2/dyEAgTE3HvvaM1RWdxre/NoOowdDN6g1fJwxnw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0780796e-5116-4bb6-102e-08da6bab80fb X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2022 06:29:17.5269 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AZMNO5YLq3lWURYudLt96sUDg9FMzQNWHMvm8NDaeyFDCro34vBqijnEgAsoGX8Sj1GSLIlmeg0u6R8Wf4gA3nOvneRhVnw1M4FmAs3HmAE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5744 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-21_28,2022-07-21_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 phishscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207220026 X-Proofpoint-ORIG-GUID: NX4hAv9EWKD6OLY2VLJSfTzDtyyRxApQ X-Proofpoint-GUID: NX4hAv9EWKD6OLY2VLJSfTzDtyyRxApQ Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This is a minor bug which means that certain error messages are not printed. The devm_gpiod_get_optional() function can return either error pointers or NULL. It returns error pointers if there is an allocation failure, or a similar issue. It returns NULL if no GPIO was assigned to the requested function. Print an error in either case. The gpiod_to_irq() function never returns zero. It either returns a positive IRQ number or a negative error code. Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support") Signed-off-by: Dan Carpenter Reviewed-by: Xin Ji --- drivers/usb/typec/anx7411.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/anx7411.c b/drivers/usb/typec/anx7411.c index 4f7a5cc968d0..311b56aaea9f 100644 --- a/drivers/usb/typec/anx7411.c +++ b/drivers/usb/typec/anx7411.c @@ -1326,13 +1326,13 @@ static void anx7411_get_gpio_irq(struct anx7411_data *ctx) struct device *dev = &ctx->tcpc_client->dev; ctx->intp_gpiod = devm_gpiod_get_optional(dev, "interrupt", GPIOD_IN); - if (!ctx->intp_gpiod) { + if (IS_ERR_OR_NULL(ctx->intp_gpiod)) { dev_err(dev, "no interrupt gpio property\n"); return; } ctx->intp_irq = gpiod_to_irq(ctx->intp_gpiod); - if (!ctx->intp_irq) + if (ctx->intp_irq < 0) dev_err(dev, "failed to get GPIO IRQ\n"); } From patchwork Fri Jul 22 06:29:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 593254 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADC85C433EF for ; Fri, 22 Jul 2022 06:30:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234151AbiGVGaO (ORCPT ); Fri, 22 Jul 2022 02:30:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbiGVGaM (ORCPT ); Fri, 22 Jul 2022 02:30:12 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56EABBE12; Thu, 21 Jul 2022 23:30:11 -0700 (PDT) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26M6Sp3U002641; Fri, 22 Jul 2022 06:30:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : content-type : in-reply-to : mime-version; s=corp-2022-7-12; bh=AzRP7SU1XHBsvAe3JwIxh8R4qPtC0oVEqGXF7l2ASlI=; b=NEX1ulH5AdP7WpJBXrlwitaEOXrq6LOn/UO2+EpFKLLDiOs69V2MltMOTGs/fKcJhAvl FX2An722C0O7w7KPL3qoWguuljfooJ2YevjteoikzCb2V2WtFjJt/kSqazXfHvjDpBom 4c5LU5xhmbybiD2BbJxSKQaFd2q7hDtCfxSTceq4mqLpmc5SR05baR5us2v3HvpeH/OL 5vyAw/7KjqEQ73if0wa94RsJ65OhCE6NMxO1dYAZHG2Nr9OD05uhixZE1qOJqOTmP6i4 Uv7oDO8n5em1YgHG4vSp1lSWLkxmN211DETyikrunMXbEAOCu+QW/B+EzPBef8MGM6A9 Vg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3hbm42pjfx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Jul 2022 06:30:06 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 26M6QPRB016513; Fri, 22 Jul 2022 06:30:05 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3hc1eqctn8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Jul 2022 06:30:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bjRJzLi9n85TUc6DDy2kMfctp16NtqFPUT9b+b6LMbEEkkk1aVXcEQrWKlTNmylcRJny2J6eoiksw6Y4+wsUEp+AG9wKTJdynxSsff8xe25iiGhX4mdG2m1IpOG4/V05l/cOjQQvHkF5kImKOa9glPBXmTj319JyTBil3Sl6CdxwAAr+/BwG0FNndpsI1PjlGMimmCKrsF/zK7SQRdY4jndyze+cnsMUB2nuWhsP/8L0Jmq/svq0c07xIem+zwvyHg2e+mgObYDspPHgnPSFPJUJiIFNLEb1UPzoBIPmeM3Zqg8Q0Wm3ATehIEyYKPuYgDtaTTBqoJXLbcn0wVLObA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AzRP7SU1XHBsvAe3JwIxh8R4qPtC0oVEqGXF7l2ASlI=; b=G9JjP1LaUyjWDl6u2jNeuUU4kDzHuO3z9lJWrrxJagjP0WzB0Y3Prc+tFQJcEqZ1zNeSxt/D2+vw2QxhYkWRXJVJitjn9Pg/heqrq90Kf4lTOlUVaTvYcule5ENuMjLNdn5o5RlsgHrDo46j+11XjRFgIcLyfFGU1N6+yLkyffsITomynVMV9/hR78xETHE/T3cW0u2XW33C+pxgi/z77NVxmQwOeWiSxy4Tm9bTpDY080YlWbHeX0qNSmPKIMK1HRElby4gGt87WxXaHUHZWU+kmOSOeqJ/ZYoDbnGQyNRl+UbAVFuRSASsQSk9JLwSdVTkTDVuiv6jdRN8/5jkSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AzRP7SU1XHBsvAe3JwIxh8R4qPtC0oVEqGXF7l2ASlI=; b=Se+2g5D5c05rA1M+EcWh1/5sIzPF9EgxDFpUJvlbxRr2EhSMYU2aoWcqcU8TmYuKF8KxqVcw+Cb5d93CiN2VddSGt6kNcQ4wLNCU+iLRabKwMpz8FPnWETNbprO5Ipe3wWbGgWNnrkiUX7uadr3aNOKOMYeX6jf0h0tNKbecC9Q= Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by SJ0PR10MB5744.namprd10.prod.outlook.com (2603:10b6:a03:3ef::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Fri, 22 Jul 2022 06:30:03 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::24dc:9f9a:c139:5c97]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::24dc:9f9a:c139:5c97%4]) with mapi id 15.20.5458.018; Fri, 22 Jul 2022 06:30:03 +0000 Date: Fri, 22 Jul 2022 09:29:52 +0300 From: Dan Carpenter To: Xin Ji Cc: Heikki Krogerus , Greg Kroah-Hartman , linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 3/3] usb: typec: anx7411: use semi-colons instead of commas Message-ID: Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email haha only kidding X-ClientProxiedBy: ZR0P278CA0079.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::12) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dea810c6-3780-49d6-6e1b-08da6bab9be2 X-MS-TrafficTypeDiagnostic: SJ0PR10MB5744:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J4bGgqAwxHBmsLiGSJM7MMlCK4XB/oHNCF9RlvpFLAFgfbpGqDx3ZbXETmjFcozaX46lkBoAQRBH/mrag4+Krxx09+14y9LXq7QNZU6SyjUTi3jMvmuL2Z5SH4qheZW/v2antqVVLXMoU6UbjGHTCZMV0gh8cAYb89sBmE9M9hByKWVwNEyYyKMLTSSXQeuQ4LMJ7ZLDVb7HJQ/mx5/jBtLzah87i2cuf4lPmuXCckj12u3CwiO+Bl9eKoTy0JfyFhUhlwfx3x/efr7uCfn4v5evytdQ7E0XWzEp6QuFynoG8gwp/AUSXEr/9iKeaQOzQvVUSdskYRSLfFkYRLwLKqQZm1HqKevqXTRCplSxxlhpK9U9WTe9HKP6cqpqYSuvV7n8221lB6BjNAXw39zOvDEd9rvQUUSElPjvd10dRSFEAIpKRDes6wiSY+yVOiwPjQ4qVc8HCmkFdhMUVtoNhLIhuqcEErk/jpIscl5lErfwrSz6iQNDrvnR/1zLmNV2HPFGMhbdlb3TEWMrGLe44kiotRAduyPMGsNdIPl+/WWowpyx9ENYjhdOVmmbozkat24P84aSDV0Kom912USzSPWe6qZZQ6zk8/6AZH4RIj4WTxWHRF9gb53aFIp95v9TDeYZy1gm9hV4Idnll5SoQTOYSIkWzCj6Aq0Z/qLUWEhI7JZTLQpBW2UdtLOJXaVIY8bIeoyFXumgvhi61oGzsDGc9bEzKfvbOaA8DImbFFG0IZeIRcTpxpJe7TKeG4eZtphlOXu2RMiNxYBH3OuMUil0T0i1NipOpB9dYasTgpl71BAdTaloT+PC5JqgG1fU X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2365.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(7916004)(136003)(366004)(396003)(39860400002)(376002)(346002)(33716001)(86362001)(38350700002)(478600001)(6486002)(38100700002)(44832011)(8936002)(316002)(5660300002)(66556008)(4326008)(8676002)(83380400001)(186003)(66476007)(6506007)(6666004)(41300700001)(2906002)(26005)(6916009)(6512007)(52116002)(54906003)(9686003)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9fyvz90/E32D/M2AWJ06mhO7ZO/+bBnMCCFpfybe64+q6T7YIGmE28o2/lU2zgV85h4CtPSVFherbCqHVuw6ce9dDTsq+eA6dDII6pPk3E3ffFn2jU/9t7cl+FWuApp04hMtq4qT913/hTUGk6c7k9amZr1knR2GY8R6G0kx48qbn5zzYVQk/YQta68GEWOquJVjj5CEU3HGhdjrUnShcrjW9VLCwWU6rLRlqHSkfC8c9hZVhBSKrueYlv6pCGnYiveJf61VFUhXuKo/eESPPn3dlzRNTWd6/Akdjn/PrESmKTij6EJs65skyTUGqTjrhlqkm3K0q5iKvskcFxzwDfB7Y3uPDiHzt3BHyWIyWe1dYRszYuDwmfIXxPitQA/VT+mbSxAdsdVy9dQzQsrIePGjR02hFk8gTMva6tIqzlZirlpqqLXPtSWVM84Ij+txapezoJnxxTYCWYLZIWSJDAeCsHAlVZQdVo6FQpIC4MnCWD5cWi/4mcgr4XkpE2VB1siOhjhQzRmRACY0UbkHTeKAoGFV3BQNwittV5Fz7zQO7fqpNUPzX0Th/HDK2yAIi+FMBsUxnFqVLPAUhYW7CEB5hrF0CRtPCBs9GKzZgm8k4TMf2cJrBNvKteP+sVfz5V9pK8EQwUTm52Js+l+OZS+97JoMfum2iGOgmbYwzyu+UtJlodJf52kNVtToCrwEn6aSmyoVXsGlKXynrKUakVGyrpLArKT40Vtbl09KfbSc7FaWhwd8ZEKO+zOseQHoUHfUeKD1vCrKSbbSeVNIYHSgVhgx9nXc8yY+/1ccrXwrxdd9WfrRYXdOv3PI36PDEvo+e875lmVvuFDbgedIbtcjki6/1c/Ceo41lFzF+Wnvqd0nQf6xqm4r+8HyYhxEihOFkHtxpoB+wTcDNtbFXWwpq5o3KnkJMiBFGYWZnav5JaIDWaYdymCxrCrr2kQIyhUqcrbGKDHjrCXjaiq/JRi+CDpw7NtiAndXA0QRklVvBHiHKCJbK6ddyPX8R0PGpnMXUdrvv450d62gKftpHZpvDP/x1GZbDeMeTisLPd+a7yFch6rEQ8mC+fSA/H8mzxbv+opplW41zef0hq+4KiFfdyZY95wRyd969Oj1zXghsNbirEsW1RBjeqQiod/OoQB0gUyxjvRhKEYZ4zupnWzEcL/HUHb2OWNrj8TyECBWTPhkSMwYGtP7vz1Edx38wfiewTCNE4jtkr9nlXgZDamVBXOMC4pAbAxxgFYPHCDA019/1BJSfqBN2uEaQg36vtDCmNqe15qt9yd+7qEZjVC5UHeZ7SNcyjmjtnpCRZOcsVcXnKyZz1g6HozuOJHxR3AD4kEJuIVxwItIRLp+nwUShCiCVQLVcFAI3Ty2EUImcvOmd+9LtCkwhmPXtZRjqRzcOcg1Y4ZMtQFdaKUOlKQghAPideRnQ3+8WsFlaLr6KiAepOHgTjL8/xZly8uNw2xRQEKp1+4h73CXMVo2PQERxAHdyPZkZT4pWVsC5xfCxYddwxm7tGEj2/t9hmiYu7dkx/KGIn8Ovnhh8QthngvsMwwDFJ7/OwGfZAYPqoN5EY87jOh96Efh5P/GTiX/8sfD4Gl37yiRMYWV3e5lGg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: dea810c6-3780-49d6-6e1b-08da6bab9be2 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2022 06:30:02.8358 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: auAGZBtxH9txrjRjryoKMg6gGawiapjdern3QgBdtVqDdOvAoKEqN/hOUsYgemQH4ZvmtaLigt8jRU+OEwJSejOMwD1TlbuS34OnUtOQqJs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5744 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-21_28,2022-07-21_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 phishscore=0 adultscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207220026 X-Proofpoint-ORIG-GUID: kTNMypMJFkOQqvbiY9m_9h7QDWsGvfAV X-Proofpoint-GUID: kTNMypMJFkOQqvbiY9m_9h7QDWsGvfAV Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Semi colons and commas are equivalent in this context but semi-colons are better style. Signed-off-by: Dan Carpenter --- drivers/usb/typec/anx7411.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/typec/anx7411.c b/drivers/usb/typec/anx7411.c index 311b56aaea9f..18a6a6a8b9eb 100644 --- a/drivers/usb/typec/anx7411.c +++ b/drivers/usb/typec/anx7411.c @@ -1421,12 +1421,12 @@ static int anx7411_psy_register(struct anx7411_data *ctx) psy_desc->type = POWER_SUPPLY_TYPE_USB; psy_desc->usb_types = anx7411_psy_usb_types; psy_desc->num_usb_types = ARRAY_SIZE(anx7411_psy_usb_types); - psy_desc->properties = anx7411_psy_props, - psy_desc->num_properties = ARRAY_SIZE(anx7411_psy_props), + psy_desc->properties = anx7411_psy_props; + psy_desc->num_properties = ARRAY_SIZE(anx7411_psy_props); - psy_desc->get_property = anx7411_psy_get_prop, - psy_desc->set_property = anx7411_psy_set_prop, - psy_desc->property_is_writeable = anx7411_psy_prop_writeable, + psy_desc->get_property = anx7411_psy_get_prop; + psy_desc->set_property = anx7411_psy_set_prop; + psy_desc->property_is_writeable = anx7411_psy_prop_writeable; ctx->usb_type = POWER_SUPPLY_USB_TYPE_C; ctx->psy = devm_power_supply_register(ctx->dev, psy_desc, &psy_cfg);