Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp837045pxb; Thu, 25 Feb 2021 17:04:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1YYptOIOgv2DrX5ZoJKTcQt1EqcSuRD5LeHxobIPS8MqxvHiT906Q9YYWA0Yg3tcKVf5L X-Received: by 2002:a05:6402:158d:: with SMTP id c13mr637959edv.297.1614301454085; Thu, 25 Feb 2021 17:04:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614301454; cv=none; d=google.com; s=arc-20160816; b=LyFJQBi3SGRJ8rbhrJ52zMhZun6XIzoWOe+peixYnmBQ5+68taeLKro4IWFXqIjtoN KVBvY5zAuPB9NWToFUUg1uGjOk2S/+vJlhPrxRgv9iyV8ygYSnwlyKuWl62RGyamxeSI XQ6IsrpMdlA9XlXDh3qNgM30yaGQEqk9MzXATcs8jdn+V65xZmlCoAk5yZTPR6sROTd8 5saFvmvrdjKBrN/BmS4b0fws7Uz9QLlfwxjHTBomOE0ms9YFNql+Jg/uk1MqfMXLneWZ cd0Ca6EOWCkk3ZrVC6IvUGHTiTWL73giPwl9xDy0vxuRpKVJpRfeaD3/ik2Dtm2umPHZ 3xFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=BQFgMbUGZH8E7bnID/6HHpjMLsUJ8TI34V+f2dOCkgY=; b=nFE5WQfeBkbTKHhCKK239j1110PggGshv7VSmDmMt5T0uZ2xAobyFYQKcUCSVzv1rf NNL6+1O1U+ra6jRDgbHkJIFNeUjlXYGHV4KrU7h/t50xRnE3WxczmQyxoyM9MD3614MR dWeUAeQklid3pvKyVKyQcooJKH/4FFxssXQVWXqCLnvC8z3jjgYd9w4D0Uq4qfi0sOiM TvueKl37Um86/EZFiMRpcfA/Na7Ma6M1qmrZyyNKX/yuTpJg1FkdMwK277EbVUoYuLhT tuxOnsrsRKiMPPkrvxHJfb63Z1TbpcKX8o8OITVIyPdYqXSZBQeJ+QUgafedQCh4IxCa lSTA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u5si4438181edv.181.2021.02.25.17.03.50; Thu, 25 Feb 2021 17:04:14 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230100AbhBZBCC (ORCPT + 99 others); Thu, 25 Feb 2021 20:02:02 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:3033 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbhBZBCB (ORCPT ); Thu, 25 Feb 2021 20:02:01 -0500 Received: from DGGEMM406-HUB.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Dmrsd1ZJGzRHRD; Fri, 26 Feb 2021 08:59:49 +0800 (CST) Received: from dggemi761-chm.china.huawei.com (10.1.198.147) by DGGEMM406-HUB.china.huawei.com (10.3.20.214) with Microsoft SMTP Server (TLS) id 14.3.498.0; Fri, 26 Feb 2021 09:01:17 +0800 Received: from dggemi761-chm.china.huawei.com (10.1.198.147) by dggemi761-chm.china.huawei.com (10.1.198.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2106.2; Fri, 26 Feb 2021 09:01:17 +0800 Received: from dggemi761-chm.china.huawei.com ([10.9.49.202]) by dggemi761-chm.china.huawei.com ([10.9.49.202]) with mapi id 15.01.2106.006; Fri, 26 Feb 2021 09:01:17 +0800 From: "Song Bao Hua (Barry Song)" To: luojiaxing , "nouveau@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "bskeggs@redhat.com" CC: "linux-kernel@vger.kernel.org" , "linuxarm@openeuler.org" , luojiaxing Subject: RE: [Linuxarm] [PATCH v1] drm/nouveau/device: append a NUL-terminated character for the string which filled by strncpy() Thread-Topic: [Linuxarm] [PATCH v1] drm/nouveau/device: append a NUL-terminated character for the string which filled by strncpy() Thread-Index: AQHXC2rCMCjd7ClCyEWCr1KHIxXraKppnNNQ Date: Fri, 26 Feb 2021 01:01:17 +0000 Message-ID: <1b841f487ad742ee941282b534bdcb4d@hisilicon.com> References: <1614253132-21793-1-git-send-email-luojiaxing@huawei.com> In-Reply-To: <1614253132-21793-1-git-send-email-luojiaxing@huawei.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.126.200.34] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogTHVvIEppYXhpbmcgW21h aWx0bzpsdW9qaWF4aW5nQGh1YXdlaS5jb21dDQo+IFNlbnQ6IEZyaWRheSwgRmVicnVhcnkgMjYs IDIwMjEgMTI6MzkgQU0NCj4gVG86IG5vdXZlYXVAbGlzdHMuZnJlZWRlc2t0b3Aub3JnOyBkcmkt ZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnOw0KPiBic2tlZ2dzQHJlZGhhdC5jb20NCj4gQ2M6 IGxpbnV4LWtlcm5lbEB2Z2VyLmtlcm5lbC5vcmc7IGxpbnV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