Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3380588pxy; Tue, 4 May 2021 00:18:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNXh7clnSQCmSsOzf9G2BIfPcaki7EtzRGlBZFdCtV0nsV7NinXy5XU29wCuy9axIgJbZm X-Received: by 2002:a17:90b:1a92:: with SMTP id ng18mr26551721pjb.213.1620112700498; Tue, 04 May 2021 00:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620112700; cv=none; d=google.com; s=arc-20160816; b=I9xlD9HhPXVRMdNJlntdY/GPRhW3z+vEkG7lQO6PoJhTA86iWj3jf3tRi+0e8kIaS7 6DwXJEM5P1pRgAa6tvJHj7lfKd90PLC4NT/CXxN10xdluFcE4qpS/yBOHb1zUjBra2Q6 spc+tARFLrM93aTCP/kjUV4L+EoysEyKqyVoyefHgzUs2xLRcWshYBdNr35Oyoq0wpla /jAyBIJSPBJaWwuCwIR0y7DaCOEuHkgoor7MsBv4lUMITyv+2LUOVK++dXjQ5U9mYAEO S9Ue2FCHcO/erq/xm27TDoERCjcGYKEROIn5THMqb5mE9o5hjebbhn+3vtMs96QSh3pm mvOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=afUJ1/rQV4J1imx9Ghnfc7q+Lf/2kuHrWmKNabgOpLc=; b=TAfUFl1tUrF/sttuWtqMaIL/79jQK7JFHDlUZUk5h7DoDPOLPmUYZHAnQLmYYK2V33 0n2rqVbs4GwDzc9PSo882DNXJaa6EQjZ2VSqxOUeNwil+u7SSko22EeUnBn4BblnT+3Z O6BHFGMCIzHCB4GlNKbPqiz8BzpvoOZNTXG5KweLLUrH7eYVIxN6Rpk4as9R2/+6rrvl raixQAXeAjT6ifQTgZxXk9Of8kjMsORMcQBuZr94ViMGzUjZQVUhihJlHGl/V6tXferK 1KkG4XLK3pTKclOt/Ltfgs81051l9c/6AoQ1cT9LMrE4ka43ycSz5KrbkidxG6Lg+GKb IezA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=nVaOHo3E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t17si2277810pgm.289.2021.05.04.00.18.07; Tue, 04 May 2021 00:18:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=nVaOHo3E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229959AbhEDHRL (ORCPT + 99 others); Tue, 4 May 2021 03:17:11 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:17780 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229879AbhEDHRK (ORCPT ); Tue, 4 May 2021 03:17:10 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1447CW2p009695; Tue, 4 May 2021 09:16:13 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=afUJ1/rQV4J1imx9Ghnfc7q+Lf/2kuHrWmKNabgOpLc=; b=nVaOHo3EnC0GDJ4dz7Yk7Zf1o4ABe2v755RO3PqIg1ok0rjh86+n1yJOrakIBJMOHeti 0N+e9sS1fA+zO05mQK2oABqVCjXq33C69KQt0epK/VDs3WjXEa7eLuJ9+wvoP42xHxDY dguu3aAuJjz4SizwDvJsGV6G6LyfFQCQE7o8tO1V0sfafkDkMFNN4AzWG/76DQyUcpSR sw5VMFQxRyjRsPoH9PEKhxbaOVEkOcufj9Q1C86br/hw5hCLH/eojaA4E7pIYYpj1Bkm faknIItrA77RSQVs2gV9nqkdYZLwKZJ2aljbS0fxsfGdD35lTZbXGCxRjYDpvbPOyxjT Ig== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 38ar8djn9m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 May 2021 09:16:13 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0AF5A10002A; Tue, 4 May 2021 09:16:12 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id EDF4520E5DD; Tue, 4 May 2021 09:16:11 +0200 (CEST) Received: from lmecxl0889.lme.st.com (10.75.127.47) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 May 2021 09:16:11 +0200 Subject: Re: [PATCH] rpmsg: char: Remove useless includes To: Mathieu Poirier CC: Bjorn Andersson , Ohad Ben-Cohen , , , References: <20210429080639.6379-1-arnaud.pouliquen@foss.st.com> <20210503174238.GD1699665@xps15> From: Arnaud POULIQUEN Message-ID: Date: Tue, 4 May 2021 09:16:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210503174238.GD1699665@xps15> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG1NODE1.st.com (10.75.127.1) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-05-04_02:2021-05-04,2021-05-04 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Mathieu, On 5/3/21 7:42 PM, Mathieu Poirier wrote: > On Thu, Apr 29, 2021 at 10:06:39AM +0200, Arnaud Pouliquen wrote: >> Remove includes that are not requested to build the module. >> >> Signed-off-by: Arnaud Pouliquen >> --- >> applied without issue on Bjorn next branch (dc0e14fa833b) >> --- >> drivers/rpmsg/rpmsg_char.c | 9 --------- >> 1 file changed, 9 deletions(-) >> >> diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c >> index 2bebc9b2d163..e4e54f515af6 100644 >> --- a/drivers/rpmsg/rpmsg_char.c >> +++ b/drivers/rpmsg/rpmsg_char.c >> @@ -10,19 +10,10 @@ >> * was based on TI & Google OMX rpmsg driver. >> */ >> #include >> -#include > > This is where the declaration for struct device is along with other goodies like > get/put_device(). > >> -#include > > That is where struct file is declared. > >> -#include > > This is where you get ida_simple_get() and ida_simple_remove() from. > >> #include >> #include >> -#include > > This is where struct poll_table and poll_wait() comes from. > >> #include >> #include >> -#include > > This gives you kzalloc() and kfree(). > >> -#include > > This gives you copy_from_user(). > >> -#include > > This gives you RPMSG_CREATE_EPT_IOCTL and RPMSG_DESTROY_EPT_IOCTL. > >> - >> -#include "rpmsg_internal.h" > > That one I agree with. I started by this one and then I got carried away tested the other include... You are right, I just don't follow her the first rule of the "submit checklist" "If you use a facility then #include the file that defines/declares that facility. Don’t depend on other header files pulling in ones that you use." That said I just have a doubt for uapi/linux/rpmsg.h that will be include by rpmsg.h[2], as these includes are part of the rpmsg framework API, should we keep both, considering the rule as strict? [1] https://www.kernel.org/doc/html/latest/process/submit-checklist.html [2] https://patchwork.kernel.org/project/linux-remoteproc/patch/20210311140413.31725-3-arnaud.pouliquen@foss.st.com/ Thanks, Arnaud > > Thanks, > Mathieu > >> >> #define RPMSG_DEV_MAX (MINORMASK + 1) >> >> -- >> 2.17.1 >>