Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5710624ybh; Wed, 7 Aug 2019 10:06:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDi6yMMZ+F7QeXs5+ytjDzr8Izu4EVPQp5baGFLlLnrZPPNbNC4w40QCbmP8ziThhBHvR5 X-Received: by 2002:aa7:8acb:: with SMTP id b11mr9983342pfd.109.1565197608538; Wed, 07 Aug 2019 10:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565197608; cv=none; d=google.com; s=arc-20160816; b=nbZ2WrDvtsvQxKJZ+ql4d2/f7S9PI6zFtQukEPp5jFMfe7UJDNlTKKZF2EFFFOUXHH yt5wDolK6wR9tv9VrKJsH0LqKv2MZsJS/y0aD9bYdsxjga+u96d9D6q/sPns0+UfS0gn GN+2+YwFQ3ZjMMrwJb8z0ECURrzanLVfiAQhY9M53vy3+fs8wGfP0PW6Z0aUlbOgu8uU 5oE/HhD8Tnb4Dqe5DFUEftwcYfZ1XhQF/ekpocLkQ/foCruwjWSn3QWo4L+vPr3nO1rx X3uGz6DfqOHGg1YIRJY1A83YJzRv01oMkKQR2FnxFHJdNt/EDsdaVfrf2He9CYdy0Jii Ghlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=403rFY141+ngslfVmPOcoEAaGGO5wWhTHo7yhw07SPc=; b=tIwpgmAOn8D146rp7RmjkHkMxk0K72vLercKi6xnxR4fsnRkWf/i0bRTCzeZI1Tk86 pyy7eeC/PU9wNBanxMRTg1jOvAVAs/jzTagfyWQmWWTcepcwxuHmt2Q0RLOfOLQ5gGWU Y8TbQS4RGmwjS0nvBW/xTKHkjlJNT3NGIme6aLPWodIVktJgBDfwAsTtt+soA388GEXf oqzW2N3kkAmDX2AidRAdu7krWt+DTZIh5vxVanwthNyR+HVvkc6c6k8G6rRQeL8uWHHT XLp9t229oKuEEBLhkIZd3/QE2rCBq2SB+ZejJA/0QNdyGwVvxxyaUAJyk77Bmp5mPCcV kcHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=TdBW40cd; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f74si49552957pfa.57.2019.08.07.10.06.33; Wed, 07 Aug 2019 10:06:48 -0700 (PDT) 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=@ti.com header.s=ti-com-17Q1 header.b=TdBW40cd; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388941AbfHGQu7 (ORCPT + 99 others); Wed, 7 Aug 2019 12:50:59 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:44920 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387967AbfHGQu7 (ORCPT ); Wed, 7 Aug 2019 12:50:59 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x77Gotmx130524; Wed, 7 Aug 2019 11:50:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1565196655; bh=403rFY141+ngslfVmPOcoEAaGGO5wWhTHo7yhw07SPc=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=TdBW40cd4WxBvmMMpoR5fQvlllMfy6scyNdWsz3gPHpjDreG3iVFJj7m6VsP8FF3s Ko4geLeQVmn7WGPKzbTKFDSHA3H6JFC52rBMZ/RwVPvdw9tE79LG5a5f3yV9aUwjnR qaad9+9In7iYYYE0TQnrOIqrgusEC0xPh7+3qHxg= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x77Gotfh094692 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 7 Aug 2019 11:50:55 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 7 Aug 2019 11:50:54 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 7 Aug 2019 11:50:55 -0500 Received: from [128.247.58.153] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x77GoscP123429; Wed, 7 Aug 2019 11:50:54 -0500 Subject: Re: [RESEND 1/2] remoteproc: replace bool from struct rproc by u8 To: Loic Pallardy , , CC: , , , , References: <1565170879-3185-1-git-send-email-loic.pallardy@st.com> <1565170879-3185-2-git-send-email-loic.pallardy@st.com> From: Suman Anna Message-ID: <5ef3cb58-76cf-512b-4c39-08f5b9e2d67f@ti.com> Date: Wed, 7 Aug 2019 11:50:54 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1565170879-3185-2-git-send-email-loic.pallardy@st.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Loic, On 8/7/19 4:41 AM, Loic Pallardy wrote: > Post [1] and checkpatch tool indicate that usage of bool type > in structure is now no more allowed/advised. > This patch replaces bool by unsigned char (u8) and reorders > struct rproc fields to avoid padding. > > [1] https://lkml.org/lkml/2017/11/21/384 Btw, that checkpatch warning has been removed and documentation clarified in commit 7967656ffbfa ("coding-style: Clarify the expectations around bool") added in 5.1 kernel. I have actually switched to using bitfields on some of my patches downstream because of the same checkpatch message, since we seem to have a number of these fields, but that also requires updating all the field values in various drivers to use 0 or 1 instead of the boolean values. regards Suman > > Signed-off-by: Loic Pallardy > --- > include/linux/remoteproc.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h > index 16ad66683ad0..8cd22fecea61 100644 > --- a/include/linux/remoteproc.h > +++ b/include/linux/remoteproc.h > @@ -472,15 +472,15 @@ struct rproc_dump_segment { > * @index: index of this rproc device > * @crash_handler: workqueue for handling a crash > * @crash_cnt: crash counter > - * @recovery_disabled: flag that state if recovery was disabled > * @max_notifyid: largest allocated notify id. > * @table_ptr: pointer to the resource table in effect > * @cached_table: copy of the resource table > * @table_sz: size of @cached_table > - * @has_iommu: flag to indicate if remote processor is behind an MMU > - * @auto_boot: flag to indicate if remote processor should be auto-started > * @dump_segments: list of segments in the firmware > * @nb_vdev: number of vdev currently handled by rproc > + * @recovery_disabled: flag that state if recovery was disabled > + * @has_iommu: flag to indicate if remote processor is behind an MMU > + * @auto_boot: flag to indicate if remote processor should be auto-started > */ > struct rproc { > struct list_head node; > @@ -505,15 +505,15 @@ struct rproc { > int index; > struct work_struct crash_handler; > unsigned int crash_cnt; > - bool recovery_disabled; > int max_notifyid; > struct resource_table *table_ptr; > struct resource_table *cached_table; > size_t table_sz; > - bool has_iommu; > - bool auto_boot; > struct list_head dump_segments; > int nb_vdev; > + u8 recovery_disabled; > + u8 has_iommu; > + u8 auto_boot; > }; > > /** >