Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp304264rwb; Thu, 27 Jul 2023 13:02:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlEFZn3PTMPjUfUR0qccgT18eEMt6GlTj7W5DL2gKLM1xJdqPKDbIZmwl+UXG2hnoIALIfby X-Received: by 2002:a17:907:7603:b0:993:e9b8:90ec with SMTP id jx3-20020a170907760300b00993e9b890ecmr186848ejc.22.1690488176674; Thu, 27 Jul 2023 13:02:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690488176; cv=none; d=google.com; s=arc-20160816; b=jZ7TKiJtp0Zhv/gTtwwh31NU1tRiyNHBOY/SY5SRXqvHXvehe3n4d6Ks/7lUVkuA97 4tfAoiC1NLzOStZ7e9bE9QitrrrWzR/i8x3jq1vv9eRBghR138iM0ZuJ10IXDjXeFq63 Y+eXIAmwtpvNoAp8iaJz+BiUkV+bZ1XF9G+S0SLsUohzP91uWzrGzKi1BajyWTjGtoLP zkYOOzqTPbqHOD7Rf9nPL905gEokMlCTQc8v8KuU3RvN45+M1PxcIpKL1RDZcSDpWVAg 3am4oQ/Qe5G6znDn0O6nDbRbKbTiH5PHpwVsOUTsaaQuPAdjyqnEGJGtj+Mq3VAvQOgS PeDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=ybZxTfD2rX7R/RZMpfd/hcltnfBMizJC4y8zgc32XPc=; fh=+PMNqOJ1xTyLwQxWkJqmOsPt9BR8PU4vwL55bxqMUtU=; b=UfZNY5iucVLbHIv+82qjrt6vMNC/SodGn/Qe0Zh1ihbgniMM6t2Sf8ltPzkJWqdwae 2/yg7yFIGdfitQDlHM7SqUxk4G11Z++GJwh7LBhX9Dhz/nr5AvfiDAlpJMtQKNXmhzxh jNYp18mokExlF39u0ecv1vkjF2HD+ol3kf+97KHmqexuNn4I7w/A1XG/lT7FnoQxWy6D OQD7Lf+e7QfMg2gTruNZVoiG25W9aE1t3HPjzRTyluVsgEaRbLKgG/q8OpD7JrmGx5P0 obPntwM6g3JzX0//iugoUvY9LZnW1no4dOEhpktG55UFACe0+5ro4l6LpcNZeKVLHEqT J+Pw== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qp9-20020a170907206900b0098862880ec0si1392985ejb.418.2023.07.27.13.02.30; Thu, 27 Jul 2023 13:02:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232790AbjG0Tz7 (ORCPT + 99 others); Thu, 27 Jul 2023 15:55:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232319AbjG0TzG (ORCPT ); Thu, 27 Jul 2023 15:55:06 -0400 Received: from mx.gpxsee.org (mx.gpxsee.org [37.205.14.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0FFA12D73; Thu, 27 Jul 2023 12:55:01 -0700 (PDT) Received: from [192.168.1.109] (44.183.202.62.dynamic.cgnat.res.cust.swisscom.ch [62.202.183.44]) by mx.gpxsee.org (Postfix) with ESMTPSA id B1E892CDD; Thu, 27 Jul 2023 21:54:53 +0200 (CEST) Message-ID: <36f2fe3d-1808-0981-c7fe-ae236a865779@gpxsee.org> Date: Thu, 27 Jul 2023 21:55:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v8 1/2] Added Digiteq Automotive MGB4 driver To: Hans Verkuil , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Martin_T=c5=afma?= References: <20230704131339.2177-1-tumic@gpxsee.org> <20230704131339.2177-2-tumic@gpxsee.org> Content-Language: en-US From: =?UTF-8?Q?Martin_T=c5=afma?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 26. 07. 23 11:30, Hans Verkuil wrote: > On 26/07/2023 11:14, Hans Verkuil wrote: >> Hi Martin, >> >> On 04/07/2023 15:13, tumic@gpxsee.org wrote: >>> From: Martin Tůma >>> >>> Digiteq Automotive MGB4 is a modular frame grabber PCIe card for automotive >>> video interfaces. As for now, two modules - FPD-Link and GMSL - are >>> available and supported by the driver. The card has two inputs and two >>> outputs (FPD-Link only). >>> >>> In addition to the video interfaces it also provides a trigger signal >>> interface and a MTD interface for FPGA firmware upload. >>> >>> Signed-off-by: Martin Tůma >>> --- >>> MAINTAINERS | 7 + >>> drivers/media/pci/Kconfig | 1 + >>> drivers/media/pci/Makefile | 1 + >>> drivers/media/pci/mgb4/Kconfig | 17 + >>> drivers/media/pci/mgb4/Makefile | 6 + >>> drivers/media/pci/mgb4/mgb4_cmt.c | 244 +++++++ >>> drivers/media/pci/mgb4/mgb4_cmt.h | 17 + >>> drivers/media/pci/mgb4/mgb4_core.c | 711 ++++++++++++++++++ >>> drivers/media/pci/mgb4/mgb4_core.h | 72 ++ >>> drivers/media/pci/mgb4/mgb4_dma.c | 123 ++++ >>> drivers/media/pci/mgb4/mgb4_dma.h | 18 + >>> drivers/media/pci/mgb4/mgb4_i2c.c | 140 ++++ >>> drivers/media/pci/mgb4/mgb4_i2c.h | 35 + >>> drivers/media/pci/mgb4/mgb4_io.h | 33 + >>> drivers/media/pci/mgb4/mgb4_regs.c | 30 + >>> drivers/media/pci/mgb4/mgb4_regs.h | 35 + >>> drivers/media/pci/mgb4/mgb4_sysfs.h | 18 + >>> drivers/media/pci/mgb4/mgb4_sysfs_in.c | 757 +++++++++++++++++++ >>> drivers/media/pci/mgb4/mgb4_sysfs_out.c | 700 ++++++++++++++++++ >>> drivers/media/pci/mgb4/mgb4_sysfs_pci.c | 71 ++ >>> drivers/media/pci/mgb4/mgb4_trigger.c | 208 ++++++ >>> drivers/media/pci/mgb4/mgb4_trigger.h | 8 + >>> drivers/media/pci/mgb4/mgb4_vin.c | 930 ++++++++++++++++++++++++ >>> drivers/media/pci/mgb4/mgb4_vin.h | 69 ++ >>> drivers/media/pci/mgb4/mgb4_vout.c | 594 +++++++++++++++ >>> drivers/media/pci/mgb4/mgb4_vout.h | 65 ++ >>> 26 files changed, 4910 insertions(+) >>> create mode 100644 drivers/media/pci/mgb4/Kconfig >>> create mode 100644 drivers/media/pci/mgb4/Makefile >>> create mode 100644 drivers/media/pci/mgb4/mgb4_cmt.c >>> create mode 100644 drivers/media/pci/mgb4/mgb4_cmt.h >>> create mode 100644 drivers/media/pci/mgb4/mgb4_core.c >>> create mode 100644 drivers/media/pci/mgb4/mgb4_core.h >>> create mode 100644 drivers/media/pci/mgb4/mgb4_dma.c >>> create mode 100644 drivers/media/pci/mgb4/mgb4_dma.h >>> create mode 100644 drivers/media/pci/mgb4/mgb4_i2c.c >>> create mode 100644 drivers/media/pci/mgb4/mgb4_i2c.h >>> create mode 100644 drivers/media/pci/mgb4/mgb4_io.h >>> create mode 100644 drivers/media/pci/mgb4/mgb4_regs.c >>> create mode 100644 drivers/media/pci/mgb4/mgb4_regs.h >>> create mode 100644 drivers/media/pci/mgb4/mgb4_sysfs.h >>> create mode 100644 drivers/media/pci/mgb4/mgb4_sysfs_in.c >>> create mode 100644 drivers/media/pci/mgb4/mgb4_sysfs_out.c >>> create mode 100644 drivers/media/pci/mgb4/mgb4_sysfs_pci.c >>> create mode 100644 drivers/media/pci/mgb4/mgb4_trigger.c >>> create mode 100644 drivers/media/pci/mgb4/mgb4_trigger.h >>> create mode 100644 drivers/media/pci/mgb4/mgb4_vin.c >>> create mode 100644 drivers/media/pci/mgb4/mgb4_vin.h >>> create mode 100644 drivers/media/pci/mgb4/mgb4_vout.c >>> create mode 100644 drivers/media/pci/mgb4/mgb4_vout.h >>> >> >> When I build with: make W=1 KCFLAGS=-Wmaybe-uninitialized >> >> I get this warning: >> >> drivers/media/pci/mgb4/mgb4_vout.c: In function 'mgb4_vout_create': >> drivers/media/pci/mgb4/mgb4_vout.c:473:27: warning: variable 'video' set but not used [-Wunused-but-set-variable] >> 473 | struct mgb4_regs *video; >> | ^~~~~ > > checkpatch.pl --strict also gives a lot of warnings. > > You can ignore the "line length of 131 exceeds 100 columns" warnings for the hex dump. > Those are OK in that particular case. > > But the suggested renamings would be good to implement to be consistent with other > drivers. > > Regarding these: > > WARNING: Missing a blank line after declarations > #3340: FILE: drivers/media/pci/mgb4/mgb4_trigger.c:93: > + u32 data; > + s64 ts __aligned(8); > > WARNING: externs should be avoided in .c files > #3340: FILE: drivers/media/pci/mgb4/mgb4_trigger.c:93: > + s64 ts __aligned(8); > > This seems to be standard iio coding style, even though checkpatch > gets confused by this. So let's leave this as-is. > > Regards, > > Hans Hi Hans, I'm out of office till next week so I'm not able to re-check it now, but there were generally three kinds of warnings from checkpatch: 1.) line lengths in the tables 2.) the iio code style 3.) the rename suggestions I'm glad you have no problem with 1 and 2 as the current implementation makes IMHO more sense than following some strict automatic rules. The renaming makes not much sense either for me, but I can rename the functions if required. I will have a look at it when I'm back at work. M.