Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27221399rwd; Mon, 3 Jul 2023 23:17:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlFukQhtbXvYL4m3XHVrTF6VLRI26pOy3+YZK/3jAu+zaM50uxAaGAdVHAmnLAYZ3t/a9NTl X-Received: by 2002:a05:6214:2623:b0:635:dcd3:5d60 with SMTP id gv3-20020a056214262300b00635dcd35d60mr15837636qvb.3.1688451455304; Mon, 03 Jul 2023 23:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688451455; cv=none; d=google.com; s=arc-20160816; b=g0DwcnwlZ/O3SNpQTXQdqCiJuzsLXMR/H9ZOm3DaBCTma5lpzsNjL8mlIv6peeJU+b lEhQ1HbfLZLrJByjPCnIIVzRlSTa7lLGDwEryy3kk9c4Zq6VWHyb5K8ILoXtYlyLmGL6 j9mH2Ih/atUQPEgfNkyGuZn3R/3Y+LUdU6KEu9jj0JtKEU29+uvp14wwDYS7UyueDjRR i05xOZioLPWMspYXt0sE5WA/XKByd+F7FNlPk8v2d+6r7kvxG+7A7IKQNWk8tL3wPbos QN9jHhSrK5mi7UQFEPbHS7PYP+iFW0tYFwdHsXm/0UMdY2BZ0Rmyi6RhKAktXiNNJ85m pUmA== 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=VW8WGhBrJn4/StuHLfv72RoDXcRhZWmz46WLxaOy/pY=; fh=sVuIPrmUeCVWGoHOjXsGxGZjfCul2/aUkDSIDZZ09iU=; b=zNSTm32ht1HPZhF2Tyi5plWhp2Pfqy/J3MYJeAHQixZt9CsERP7lNlrjVUlkqDdRz6 EZ/aeoKd345Pf8u81E1N0lXC4AQoHTc71F19JTt7ZxruMCm7vVZAfiSbkMmxN0iao2r4 96PfV2jgSgjdWVedw4QJ9nMDVU0/I4dKW4vOM4AmhjOYNRwyiwr63wB9RmqplCkhoaje 5d/GZbla2bOxt7h2Q86nQeWx123+sFN85ohIPivvUZ/jKBG4Awy5U/ZXuDsw4yQUTB9B x5nDXjrX88euapeYzyutxDQ1RE9EMvPlffNKGfuHDDhCKXfIsXeRWuxlXuNvGR6H5YuL rDrA== 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 w4-20020a656944000000b0055b12486641si13487882pgq.186.2023.07.03.23.17.21; Mon, 03 Jul 2023 23:17:35 -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 S230318AbjGDGJn convert rfc822-to-8bit (ORCPT + 99 others); Tue, 4 Jul 2023 02:09:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjGDGJm (ORCPT ); Tue, 4 Jul 2023 02:09:42 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48FD5115; Mon, 3 Jul 2023 23:09:39 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 11EE08131; Tue, 4 Jul 2023 14:09:31 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 4 Jul 2023 14:09:31 +0800 Received: from [192.168.60.135] (180.164.60.184) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 4 Jul 2023 14:09:29 +0800 Message-ID: <9da07912-0a18-26f7-eaa6-cce076387cc8@starfivetech.com> Date: Tue, 4 Jul 2023 14:09:28 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 3/9] drm/verisilicon: Add basic drm driver To: Shengyu Qu , , , , , , CC: David Airlie , Daniel Vetter , "Rob Herring" , Krzysztof Kozlowski , Conor Dooley , "Emil Renner Berthing" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Philipp Zabel , Sumit Semwal , , Bjorn Andersson , "Heiko Stuebner" , Shawn Guo , Jagan Teki , Chris Morgan , Jack Zhu , Shengyang Chen , Changhuang Liang References: <20230602074043.33872-1-keith.zhao@starfivetech.com> <20230602074043.33872-4-keith.zhao@starfivetech.com> Content-Language: en-US From: Keith Zhao In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Originating-IP: [180.164.60.184] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS,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 2023/7/4 2:42, Shengyu Qu wrote: > Hello Keith, > > While compiling this driver as a module, a error happens: > > drivers/gpu/drm/verisilicon/vs_drm: struct of_device_id is 200 bytes.  The last of 1 is: > 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x76 0x65 0x72 0x69 0x73 0x69 0x6c 0x69 0x63 0x6f 0x6e 0x2c 0x64 0x69 0x73 0x70 0x6c 0x61 0x79 0x2d 0x73 0x75 0x62 0x73 0x79 0x73 0x74 0x65 0x6d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > 0x00 0x00 > FATAL: modpost: drivers/gpu/drm/verisilicon/vs_drm: struct of_device_id is not terminated with a NULL entry! > >> + >> +static const struct of_device_id vs_drm_dt_ids[] = { >> +    { .compatible = "verisilicon,display-subsystem", }, >> +}; >> + > > So, this should be: > > static const struct of_device_id vs_drm_dt_ids[] = { >     { .compatible = "verisilicon,display-subsystem", }, >     { }, > }; > > After fixing this problem, another error happens: > > ERROR: modpost: module vs_drm uses symbol dma_buf_mmap from namespace DMA_BUF, but does not import it. > > Please fix. > > Best regards, > Shengyu hello Shengyu , I can reproduce the error generated by compiling ko , and add MODULE_IMPORT_NS(DMA_BUF) at the beginning of vs_gem.c , it can fix the error message, I will add this in my next patch , thanks