Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp843280rwb; Wed, 26 Jul 2023 03:59:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlH5kXtsxJvZgncmnQfl6UACxkbB1ks4svUUufV1sKBFO1MfcOpgduhdTbBcFy83Oq5wbGOR X-Received: by 2002:a17:903:32c8:b0:1b9:de75:d5bb with SMTP id i8-20020a17090332c800b001b9de75d5bbmr2326240plr.7.1690369174367; Wed, 26 Jul 2023 03:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690369174; cv=none; d=google.com; s=arc-20160816; b=aaD6vP23XEy0Uan72KAfGgy70v5q76xMvBpdM3SNC0qzqFDJ7mqIm+pHAFA1nJG3NO ky+Ln/yo2t8rVP47HuRZoRyOh2ippALV5ommHhJwF2sgYfoPQwSkLFXK9qp1Wu769ST9 H/traFi7zFyH4FdXy3yIHAoxXZAeMtOESz9Yy24wcShvnxMP0f9hofjO3ge6OCFN5fKz O0ZIjqu/TQ1+UuaeP9eNZBWrTf+c/VOYIa9jG0c8ZG/c/9WA9m5QeyrumcAbAzeKbMjK bjrQrrVF8z3aiDFBwqly5YGjbzH45B12YQw0rg3gGmhvCVPd5sqhAnVKMNlRrKCWk9KO AU/g== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=rw2R92mXjAWHB8QvjQWZCLHE4m0eYw5PgqL5Q58uVVM=; fh=LgNLiRB0XNQFOVEZ/TBuEEHTaxfHwRfgESXb2bJz+Xs=; b=0qPS3g2Qd6/jvABA6+IO47UvPFF/L7dlbZ1hLTIAgAJlnozye0OIGo1RpDBWCGhCfN NDWtfmgpe5RKHHCp6kcGslX1xgA5AvNXYZh6MLgwLm835pC+WVFKI/ihZkLI5qOsl6qK 8I3272DooHb2xg3gPx/16xqpD8TtDA9PClswSyy/koa9a7zp4iAcMzpwSGRskgusPXSr S9oWiudnQDn4PHaAZXwJ1nk7VfHzCkdPEdq1zc+OYF5cEBJZOYWJeaugrto0CvL8pEox W0eCeknE0iUlzUkrs4J5AEwPi2tWiNL3NJR+VBULLYyFcbXTs8HFMt8ZGSb4LFwhVmfY jxWw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020a170902ecc700b001bbc866d901si1496867plh.367.2023.07.26.03.59.20; Wed, 26 Jul 2023 03:59:34 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233037AbjGZJcO (ORCPT + 99 others); Wed, 26 Jul 2023 05:32:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232098AbjGZJbu (ORCPT ); Wed, 26 Jul 2023 05:31:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED561420C; Wed, 26 Jul 2023 02:30:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4E09E619FD; Wed, 26 Jul 2023 09:30:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2DDCC433C7; Wed, 26 Jul 2023 09:30:33 +0000 (UTC) Message-ID: Date: Wed, 26 Jul 2023 11:30:32 +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 Content-Language: en-US From: Hans Verkuil To: tumic@gpxsee.org, 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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/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