Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5476554pxb; Mon, 28 Mar 2022 13:01:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0eDWCEieRzcd3w2xybmvWNKyDf6iam1QoqubmqhqaGVWGIeVUgkYp38xmdn7eLzx3mMl5 X-Received: by 2002:a67:f141:0:b0:31b:5e23:fcd1 with SMTP id t1-20020a67f141000000b0031b5e23fcd1mr12557130vsm.9.1648497690336; Mon, 28 Mar 2022 13:01:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1648497690; cv=pass; d=google.com; s=arc-20160816; b=O9itfvhN2JZkeq74BjRIm9ji9j9ILDrBoRVUUwlobl3piV9ndj114kZQqkZZfJyFWY 7O1RaCswqT0/1LX7LiRQLa9NBTWSMzjyEfLYs3cZjZxcs5bCebKgX0eVIKwnfNQZkPSK lTr0oybg/fyHBb5sc1H70zhk4TJPJwjB3fahEmPgIGdtW3nRpYdp92OWAktZLCkCq3oj 7tfx/bwnvMC7ltYOIzUG8KylfvEthhQE9Ny7kg2ErM4c84q2hfHhNKtiSHbztq6nYSJP LL9IyBPyMF1QsYbOzVuqcpI4KubyOmA7Pz8Wng5yapnImTv7lpANK8z+Q92kHeUMv43Y N6zg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:in-reply-to :content-disposition:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=A8Nvn0ddLbQOOP4jsW+HlVq3QzerNa+RKyjHHqZI7io=; b=X54WMI61pJ3mxoaQ3c500S8Fd2be+5yvnUMGyVSpcg/7iMX2EVfOblTYIaKR99WyOf EXAvZssxQHpu6BPcjKZOmaTgGiwc+fCMYD4dzbNVYR2kJ94KGJasorqx2/4/4YhIVrvN mzesG2dWmXRS1VqC6+qaAxLrUd103k5FygpgVzPp2PpsJ2nMtf8qjOJ1o5KPJwCtm9Nr 5dILhxh5/HiVoHQkmJ5JH3gpen15g1VdzVBGUwH3FpDVQEWP8JAixCOU6O07hrtzRxgg lZvCHaeLvjjxU3tbNqn1wgMtJ0Xj0asZ9qPZvDLb8sNDL4eRdxvZ8a/LBjBN+OHZAKDM Ljcw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=LZRaFEUt; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=F3ijiATi; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t5-20020a67a245000000b00325333fcb2fsi3110982vsh.243.2022.03.28.13.01.15; Mon, 28 Mar 2022 13:01:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=LZRaFEUt; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=F3ijiATi; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243756AbiC1OWP (ORCPT + 99 others); Mon, 28 Mar 2022 10:22:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243755AbiC1OWM (ORCPT ); Mon, 28 Mar 2022 10:22:12 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C70C05DE65; Mon, 28 Mar 2022 07:20:29 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22SCtobh023952; Mon, 28 Mar 2022 14:20:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=corp-2021-07-09; bh=A8Nvn0ddLbQOOP4jsW+HlVq3QzerNa+RKyjHHqZI7io=; b=LZRaFEUt9cL8mqWC3ZGAVgIVMj4Mn/8jQQudi8DtIcSHhWniqWy6UjOimtiLrs/PuTyB qI96R3b1ZC+HiElyw//DvgoKIl8p7IDgnqB9FPT9C/wIlzpJqhMMsKK9EdAQkpHChC8u Q/BlxnLp8SVQ7WArD5/ru1SVio8akX7wRDfw1Yzhl/nc02pQjxP946ij5r6eVi6SZfnm DRdZ6zAgEiqN/TYMuvyV08+/q44tddksbRliODIy/BxPe6XRrAVWkJGjmVAXqHI39oRR JdZccK0dPBNU5u71iBAFiw/EfPE1tcEYyRkqhcjsP1jyzqoERyMWKh2dFqpTxxf6XX1W Bw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3f1s8ckn62-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Mar 2022 14:20:11 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 22SEFxvx144355; Mon, 28 Mar 2022 14:20:10 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by userp3020.oracle.com with ESMTP id 3f1v9fcbnd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Mar 2022 14:20:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZdoQoU3g7eJ+1rDDPwsKZMEiZx/0yE51+aFxOL7nq13rKm0FMC47FsIwzjiwyZL7xuh88aekyQ9m7ZEQlvM6sxIb0ubVLc8yLo5Qkn9BA7QWcU3P7rYrYgpJrlsv8c/DD0hqZoppi8TmvwR9trLtWh/L9BAVDL6+DG9vbTniLSN7LbwnJV0Cudv6k0R6LKeeT2Z7zdG0GZHYdmrFmwit2leRIQOuUgYyh3qV0IdpSim99RKg/h/xKhLz3FPb83t3h30ZUx/IA0D3jSvhYyTq8FLHkkefrhQYh5no7YY4bnnVagMG3RmgAjNm48MHoL2IPneRrcS4LLE7XaEr1oujxw== 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=A8Nvn0ddLbQOOP4jsW+HlVq3QzerNa+RKyjHHqZI7io=; b=iwrPoFiILm8oZf4BgPP0x03ieF+ckPQRQUQHoNMYbVaz13mURaa6Q/mJkoF2m4+yiWFr3gJksWys3i5F1iAUDCY9awwaMPBIOw1F6A9UYgIUvVcF7tLcTdLJt8lkTqS9hFKt8vpsFoppOF1RCaLwQMQpKgYsidupJU4qGLs5ByxD5XMeLzpK5IE4hJDJWp1wUHJSJwnzb7ygBeSEQxbmMLeBiRf+pyXOmpzybrJcesNdJBXMQoR8kFobVzjZ3Z5AR1IBxGN5/Z1TULjkowDrVPpaCvMDJjsuexjLLnJKgWb2A939jPvqKw2Jt3mBgIHbEBIcjneAngngW6cPnROH7Q== 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=A8Nvn0ddLbQOOP4jsW+HlVq3QzerNa+RKyjHHqZI7io=; b=F3ijiATifVsWSz0qU1KVj9xmNB9eTPcKBIIkg5wWxWKQuedwpLcyr7dhum52u982pnoWRckEQXX4v6GLKALN3SjuTel7Etd1mrNwUrU7hkrhnpksDPs9ZHP4GTZCP7Z/+WnxXpeqU2uHhzs/OSJfmtZ0AHxGG5xPG/vG07QeOsU= Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by DM6PR10MB3356.namprd10.prod.outlook.com (2603:10b6:5:1a9::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.22; Mon, 28 Mar 2022 14:20:07 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::d4e7:ee60:f060:e20c]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::d4e7:ee60:f060:e20c%7]) with mapi id 15.20.5081.025; Mon, 28 Mar 2022 14:20:07 +0000 Date: Mon, 28 Mar 2022 17:19:45 +0300 From: Dan Carpenter To: Xiaomeng Tong Cc: vaibhav.sr@gmail.com, mgreer@animalcreek.com, johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] greybus: audio_codec: fix three missing initializers for data Message-ID: <20220328141944.GT3293@kadam> References: <20220327060120.4316-1-xiam0nd.tong@gmail.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220327060120.4316-1-xiam0nd.tong@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: JNXP275CA0008.ZAFP275.PROD.OUTLOOK.COM (2603:1086:0:19::20) 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: fa59d02b-d04d-4f4d-5848-08da10c60f19 X-MS-TrafficTypeDiagnostic: DM6PR10MB3356:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QcHaukMkGkuF9M054fIgvZQO01JSgHX7xqTfQa6vYBiRqeeBX2jxpXo+k8Tbtd3secRrwmNl1yX6CD3jdK8G/jdy6jgaCElVgVXRxGnbn5kbu8/U9mxshnWUZ9+CAd/bfPCvKXfH1j2CvP93oIil3qPoATz3T/rVketnrMhU7Hjptviv9XRriEvks5ZncSodH8F+qmm+IS6XyYiIPwR/PA0f/4Ka1HuAJoTtEfom02LeqXKo5E7vFcpFi4wwBb4qsjqBEqy3L6tRh1eD+9G2IvGHknJHdIHhvz/EWnFB3sc25gX9MD7r6+TmcxVtHeEz1/xmTVp/dnhiZ87JzEOz608nSt3vOUZAUqQtkhlf1iZpxa/hGCHhohG4evGJdMe9dHOjHhSoEdeGRSapPqd/RH5mdAB5+JCnhGquCSUVocYYibRoS/Vb8fW791m/wEQ20WkuvIIZPyiH32bsBmx8Wwb1yp+bLc8ywx8dQ32Mpv1Bq/EZjRx678FjCVUOEnefz145CEj5Kb3t30Sj/Rl6vvlW9jMIM8FdSrUj2Kr+10M2HQxbELkuB95Ue+AYIxAkkqT0/11r41rhovccM5253P0qWzeZrXfbemqppWe2Km9CRg5RTmcPcjAcPPcfVGt87+vfoppZomQlQz6tIxW0b+sFPT1L3BDLkPZsGwePkOermz86Ix5glMQ/3zneoi9aq80yhJQuveUZvqySP6fm5w== 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:(13230001)(7916004)(366004)(6506007)(8676002)(52116002)(508600001)(66946007)(9686003)(33716001)(7416002)(6666004)(2906002)(6486002)(8936002)(86362001)(66556008)(6916009)(316002)(4326008)(6512007)(66476007)(26005)(44832011)(38350700002)(33656002)(5660300002)(83380400001)(1076003)(186003)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?o+jL+ATETEmUv+zyjgZmUBzihSetiRQFDWbMhAuGsqr4ovxSkSe6OhvBL4js?= =?us-ascii?Q?dG1vb4VcAE+xfDdtrw/YU1cksJLsMM5ns6Bm5WwTZE0EG/31XC66g+iQsCkb?= =?us-ascii?Q?vYocLlr79n/Xe+UI+hM0Z3veNfY9nXUc+3EzBWEPlZHBE8jkZVZFu/TAAFYy?= =?us-ascii?Q?fQSQqlijPUHacXnm9sVdZKrJjaeifGgnFwpOiksraI83RAJBHs4p1ugZwFfo?= =?us-ascii?Q?Aj1P9b0ISnriILLUn08FbIxlMNOm13IONBZ2t0/89Ie7LjtydPKA62pdPkZ6?= =?us-ascii?Q?3mt4/BIJd84JiDnR8wiVe1NYdbLN/iGxsp+nwgAO5Bvjf+NiJNHRKpAALnNu?= =?us-ascii?Q?5XP4SvsasvhujkBUsOdt1fKkSONG8Nsh6pbcIAmTo00UVMu7sKilnZqTE0E1?= =?us-ascii?Q?QmoddaiXIyhCQRIsF7My2ZEUi016R/m9JWjtOBGbRqDKLG/LIzggbIEqGNKQ?= =?us-ascii?Q?/vO+wHKmiGNkXiIHjWZ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ig+4rZhiVtN15oEmpQuIiQZ/IdEyX7BmKDuLWNWXXy+pnnnm13XvDKoo9n?= =?us-ascii?Q?b00saWS7fIZqDPOsSjcKTEla17dbURJcx2vdOu9KCxbn+6MEGouflHKC+wKC?= =?us-ascii?Q?ZjWaxEigwkFs8sj0kD0eoxd/fUzVvmk5LFnv7zN+/tHiI/lR73fjuN1foFTF?= =?us-ascii?Q?roAkgfkHVc7281mIxG/TI8ipL/AW5m8JiCl0Ofx+HrnErOj6+Ao9ySdHm93c?= =?us-ascii?Q?sxeyAw/OwZIAH/ggT90IA4wl/MT+Syxfh6Zn9KpWFcGnloFd7rfKKwtrOpb3?= =?us-ascii?Q?6ViMjyKmt3n0EDq6UAyVamiwJfeOfJgDqJ6uFf/K6XwPKJuWr23uiYPpzEFe?= =?us-ascii?Q?yVQIE//DvX50/GF3AUU+GatN8ZHWm1o=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa59d02b-d04d-4f4d-5848-08da10c60f19 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2022 14:20:07.1578 (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: fTbhYxOmXEcgcDqg6u/H3L+sbrDCLeAqCeGWHwIwtwJddRG7HDJp/ODupb9vjHvv5Uw+2j0c7MQK6ivbKCdFRp4u0gSDXL/wQ1aGH6DmosA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB3356 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10299 signatures=694973 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 spamscore=0 adultscore=0 mlxlogscore=825 phishscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203280083 X-Proofpoint-GUID: Ink2SV03XbyVRUfO8FimkmTytCMQl12A X-Proofpoint-ORIG-GUID: Ink2SV03XbyVRUfO8FimkmTytCMQl12A X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 27, 2022 at 02:01:20PM +0800, Xiaomeng Tong wrote: > These three bugs are here: > struct gbaudio_data_connection *data; > > If the list '&codec->module_list' is empty then the 'data' will > keep unchanged. All three of these functions check for if the codec->module_list is empty at the start of the function so these are not real bugs. Smatch is supposed to be able to figure this out, but apparently that code is broken so Smatch still prints a warning. :( Apparently GCC does not print a warning for this. Even when I delete the check for list_empty() then GCC does not print a warning. GCC often assumes that we enter loops one time. I haven't looked at that, but I have noticed it in reviewing Smatch vs GCC warnings. Generally we do not apply static checker work arounds. I do not have a problem with this particular work around, but it needs an updated commit message which says it is just to silence static checker warnings and not to fix bugs. Remove the Fixes tag. Don't CC stable. regards, dan carpenter