From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA5ED2F30 for ; Thu, 17 Nov 2022 13:43:13 +0000 (UTC) Received: by mail-wm1-f51.google.com with SMTP id ja4-20020a05600c556400b003cf6e77f89cso4693714wmb.0 for ; Thu, 17 Nov 2022 05:43:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jEKlc7EVkMTyYRdqj3rbiRpltknwQ/iRQcgvilfGEVk=; b=Xnbv9GetmPU3k7D9txxrfvm6RhKW2pA0FRS9yIaKTAA5NEzAa5qLiDTCE7qVfPDhvd ixxgqIaqgEOIDFshihrfKp4H0h0Nj9Duh+rmGF6epE3RKJx5+GUbdelPuY30PSN4VnZQ agXN1OYcLFY+WY0T32+EO57VZc8hAAv+nAnAvxi6GNuWz9CAtUJhHJpdWqH+RRs6eMFN hjSdKsCRsoH4+PDVRI7NjrAyVHTt0Qi+4LWeVa8WcAgAgtOV5k7VAQz73m2s1lNAvPrO g3D1VQqOUaw+PDu39giScWT37vv+WTkWGJ9yrWLQZIY+MbHaFiQLrYYeHtTd0LLPmH42 Alwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jEKlc7EVkMTyYRdqj3rbiRpltknwQ/iRQcgvilfGEVk=; b=SJs6QnPb/LHs/v3x+mamw1+Ni3bFtrHTydwm6u+sYPDWkuqu/Q5GIa1oKQErz8lxbA v4qq6EzCpnb+CcL0LcsRTjsEzFVsz4WG6D6ZF7fbx0orxlHkkJfTyNBR2ZYWqgFGHLUM OFRbg8VxmbfSq2tvRNz40Mj66RNRrcOVfuoh8yjv6U8hl8NH+IOZB8qzWF+kXcJJqi6s 6F/dKEP3OFmqdtzMbff+K+1jQEc2reOfGVFrPgp6Bbpvs4w95XSMPOFFnzveXgPpZJyu Vfz4G4ut0va2Hqb41BuWhaEmlok1O2VD0LqmdIM41GtqDUsNaUKKu6Ammp5mQDdzCYkm 521A== X-Gm-Message-State: ANoB5pnKzj1Aw9D+nqvAIhzxYH0Gb/cKHlfZmLAUr+2diqoBAT8hh8Zj ti9ezWUhimMSO/gdr7VOwbw= X-Google-Smtp-Source: AA0mqf4+miOhM3yrbQCqnvEiW1biBNyVqqTa4zHXnXk7SgJWgim9YLDjTWKM89LvFSndCFHjwW7xWw== X-Received: by 2002:a05:600c:314f:b0:3cf:9efc:a9b7 with SMTP id h15-20020a05600c314f00b003cf9efca9b7mr1824559wmo.10.1668692592112; Thu, 17 Nov 2022 05:43:12 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id l29-20020a05600c1d1d00b003c6d21a19a0sm1514748wms.29.2022.11.17.05.43.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 05:43:11 -0800 (PST) Date: Thu, 17 Nov 2022 16:43:08 +0300 From: Dan Carpenter To: Umang Jain Cc: Florian Fainelli , Broadcom internal kernel review list , Greg Kroah-Hartman , Stefan Wahren , Hans Verkuil , Dave Stevenson , Mauro Carvalho Chehab , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, kieran.bingham@ideasonboard.com Subject: Re: [PATCH 1/2] staging: vc04_services: mmal-vchiq: Do not assign bool to u32 Message-ID: References: <20221117125953.88441-1-umang.jain@ideasonboard.com> <20221117125953.88441-2-umang.jain@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221117125953.88441-2-umang.jain@ideasonboard.com> On Thu, Nov 17, 2022 at 06:29:52PM +0530, Umang Jain wrote: > From: Dave Stevenson > > struct vchiq_mmal_component.enabled is a u32 type. Do not assign > it a bool. It's not a u32 type so this is wrong. u32 enabled:1; But also "true" is better than "1" in terms of a human reading the code. Perhaps this is from a static checker? I am also the author of a checker tool so I know how stupid they can be. When the checker says something dumb, then the correct response is to be be briefly amused and not to slavishly obey it. regards, dan From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BE712C433FE for ; Thu, 17 Nov 2022 13:44:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=D4r2YmDQzhgbJWnhnwm3ERpnSSmYcgnT5V3mITNtuag=; b=pVt0COpkwQ6oJ4 2G+ILgZQ/pI9G8vh2mrNjVH0asIraYDvdD8DeMpDEcZcTRuKYk3hECtaoZQIXp3VRJUGRNlzfu4Bl 8jU64lBRGduqL36Sr2vj08UVMrL6sIyMZMdj3VqSUgMFHeBrsEcZ28hXY9GTGxAW8UEwfeuAejfTo YrG7hFkRI7nRncqlVHORzZeGnTDipuecOQsIys0p0OSvc44rbLudG9FPXzH3Q3yHHg1MdeuC/7LHS YHHjm8/rNop9ETw7EsS1cUa61YHD2qSQpLQt+QTOI9GBbvav84woGO6kTE2cAdu9ZM+HXwiJ5Lokq csE3GpW2ndTetaqserNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovfAj-00EWqG-Lw; Thu, 17 Nov 2022 13:43:17 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovfAf-00EWmY-PS; Thu, 17 Nov 2022 13:43:15 +0000 Received: by mail-wm1-x32f.google.com with SMTP id ay14-20020a05600c1e0e00b003cf6ab34b61so5147637wmb.2; Thu, 17 Nov 2022 05:43:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jEKlc7EVkMTyYRdqj3rbiRpltknwQ/iRQcgvilfGEVk=; b=Xnbv9GetmPU3k7D9txxrfvm6RhKW2pA0FRS9yIaKTAA5NEzAa5qLiDTCE7qVfPDhvd ixxgqIaqgEOIDFshihrfKp4H0h0Nj9Duh+rmGF6epE3RKJx5+GUbdelPuY30PSN4VnZQ agXN1OYcLFY+WY0T32+EO57VZc8hAAv+nAnAvxi6GNuWz9CAtUJhHJpdWqH+RRs6eMFN hjSdKsCRsoH4+PDVRI7NjrAyVHTt0Qi+4LWeVa8WcAgAgtOV5k7VAQz73m2s1lNAvPrO g3D1VQqOUaw+PDu39giScWT37vv+WTkWGJ9yrWLQZIY+MbHaFiQLrYYeHtTd0LLPmH42 Alwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jEKlc7EVkMTyYRdqj3rbiRpltknwQ/iRQcgvilfGEVk=; b=NlbFaMUfHz8fvpTvXYO9335ophjikJ3RmFScagsAI0iwmDQbdzIerNRdiVTXsq8dgg UQwAMP/tELwVY9Gc1h0RPZckxzIUiPKBieT43G1+lNIzX79pLDNOXO3o+cvZy/A7AGR4 v9TCExR5v7KVuzl8S2RZf8k6EXtzFUtace1hetv7NqphuFQrB61rS2iunizZWEQrL0gu Gnx+rJtbZtSjQ6VBPvYJzp4wB/pNMN89MI1f/o846M7Lm9LKgPfrbU4k6uJDQVsTY4SI 749aJOaPcFfg/kHMeog170doiorxihBJMjzc9jzhGq7HuwNaknn9m3DxPOfI9aX4Ik2a MWRA== X-Gm-Message-State: ANoB5pldU3KHf3IFlfV7r3YWPzVwUe5pG4gLaynAa7rwv2owEPuoDrM8 srpYwI8GTNd1mkdwerQl9I0= X-Google-Smtp-Source: AA0mqf4+miOhM3yrbQCqnvEiW1biBNyVqqTa4zHXnXk7SgJWgim9YLDjTWKM89LvFSndCFHjwW7xWw== X-Received: by 2002:a05:600c:314f:b0:3cf:9efc:a9b7 with SMTP id h15-20020a05600c314f00b003cf9efca9b7mr1824559wmo.10.1668692592112; Thu, 17 Nov 2022 05:43:12 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id l29-20020a05600c1d1d00b003c6d21a19a0sm1514748wms.29.2022.11.17.05.43.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 05:43:11 -0800 (PST) Date: Thu, 17 Nov 2022 16:43:08 +0300 From: Dan Carpenter To: Umang Jain Cc: Florian Fainelli , Broadcom internal kernel review list , Greg Kroah-Hartman , Stefan Wahren , Hans Verkuil , Dave Stevenson , Mauro Carvalho Chehab , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, kieran.bingham@ideasonboard.com Subject: Re: [PATCH 1/2] staging: vc04_services: mmal-vchiq: Do not assign bool to u32 Message-ID: References: <20221117125953.88441-1-umang.jain@ideasonboard.com> <20221117125953.88441-2-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221117125953.88441-2-umang.jain@ideasonboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221117_054313_858908_3A791E88 X-CRM114-Status: GOOD ( 11.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 17, 2022 at 06:29:52PM +0530, Umang Jain wrote: > From: Dave Stevenson > > struct vchiq_mmal_component.enabled is a u32 type. Do not assign > it a bool. It's not a u32 type so this is wrong. u32 enabled:1; But also "true" is better than "1" in terms of a human reading the code. Perhaps this is from a static checker? I am also the author of a checker tool so I know how stupid they can be. When the checker says something dumb, then the correct response is to be be briefly amused and not to slavishly obey it. regards, dan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel