Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1311131lqj; Mon, 3 Jun 2024 18:17:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVyWLoFgf9FuO95w5kZ6e/0yz6lLfpkU57R5rqsIjAo6YUXPWQJHaOU4LQAA5Z+/Yen1UXDESvKQijeyGJt2sGfvTb3PyXI3UklKqW+Pw== X-Google-Smtp-Source: AGHT+IHslgnZjAdiYhT+x6G//2efRDIzSICh6qEjx5355hWQo//U8+U86mx4WsBdedfgEO1emPgs X-Received: by 2002:a9d:7655:0:b0:6f1:164b:f9e7 with SMTP id 46e09a7af769-6f911f3e004mr10990783a34.19.1717463879703; Mon, 03 Jun 2024 18:17:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717463879; cv=pass; d=google.com; s=arc-20160816; b=ilRqPiwH+iGYWzmtKnDCnth8vw3Xc7K3IpJeQlIxhv5tbcLYTiLd5L61lcDY3L3yFh LRYezSA1QG2Yeaqzahrrn9txZe4WO8hve1N1z7e3uEuVXtnVlRKqT+2EjyPV+GSKQEch kEh3+UjfP4I8d+dKZwTkdiAd5/+wMtUz8Ti1I3wRxbgmgrjZZoam4wcxmP8LER0d/ZeF cjRTFftPfRGZb0nAhV3OWMaTLVgqETlUIOKP/fE1v3SiEoJ7JgUx7GhUMA0tgUIUSKWm x3QlzUA6u0X8PeHs4kGHs5UVnNRubkNxkHXcfCgFuWU9KW3Gun59oCBTkME29MAMQpEy 1Sqg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=D29i35bHuRrirhpEpz5yWNCBKNTeKq/usJGkkqug000=; fh=KPZbC/tPISoyFOwEX9vwIxSLqvF8FUY562NdmGRHFhI=; b=hbuIf8Vfe+xqaAVf3a89PNAyRipRY60D+xDpQflitize7wFsvPtdnoIMElcCUWfDIU q/HseTGtnTaG3PTHKJwJX+whPjZJVVp7ZrzUIDvrHDI0j+DAOyKx+TU9ODC6Owl5osMm UOQRnNaaKe1Ihh/Inq3EUXmUj218Ou9htPLmCF5ZdTbbqKFMYES++2hgUoH3ZNH+UH06 fly3k7qrcGN3dxbP4G1xjqXCDf3vCnlflBNrZp7b1VzTOGDMQldegM9XOV1WalTVz0+4 z7Cs4hRxnHhlPSdJR4+EIHtl17+mz+3loeABisNqRfGzeKHlipWoxf311eMQaqOY3uAN BJzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-199898-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199898-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c359e09a40si7453086a12.250.2024.06.03.18.17.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 18:17:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199898-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-199898-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199898-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B3958286937 for ; Tue, 4 Jun 2024 01:16:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A06368F77; Tue, 4 Jun 2024 01:16:34 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 959E58472 for ; Tue, 4 Jun 2024 01:16:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717463794; cv=none; b=jjgxa01CIP1cBkrFwt/cGu494h929wxwcf97vj+hHF5Ok6QvrLK+ePJVQbrdXOGRFmsh1XKYVcGB9MDOtlBrYqrgIFLZPj4vq1shnBpRQLYWll6h/SEzzQfKlxX/sfM4tbHTi5PTiGLWfBqTzxi3eDhZk0wxTQg1iLPO9cVvIxQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717463794; c=relaxed/simple; bh=Eqh/AtuHMdxOjBiZKaHZvSpUFcM+NAehA9EHqDldqTA=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=k6LgHsqQe/gSfNjs6UXrSBR5IMu9gQw60xOjfTqHVGsSe2LfAejvQbdK/Nq0A5Tn69kqEnOeWndBKHf6U8k6NQ/+JCw+Ag46c4vDQ8PFXOcZdfFBhCgtKE6h0a9f2Al//lKaFWHlaEfB9usiR81y0wK+ctmylmrZT/kT3cf1mAc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4VtXdD3dyczxPxC; Tue, 4 Jun 2024 09:12:32 +0800 (CST) Received: from dggpeml500023.china.huawei.com (unknown [7.185.36.114]) by mail.maildlp.com (Postfix) with ESMTPS id BBEE9140109; Tue, 4 Jun 2024 09:16:27 +0800 (CST) Received: from [10.67.110.112] (10.67.110.112) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 4 Jun 2024 09:16:27 +0800 Message-ID: <3b030437-4571-7a87-55e0-5fc3f5711a6e@huawei.com> Date: Tue, 4 Jun 2024 09:16:27 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH -next 2/3] mm/hugetlb_cgroup: prepare cftypes based on template Content-Language: en-US To: kernel test robot , , CC: , , References: <20240603120506.1837322-3-xiujianfeng@huawei.com> <202406040437.z2Iel9db-lkp@intel.com> From: xiujianfeng In-Reply-To: <202406040437.z2Iel9db-lkp@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500023.china.huawei.com (7.185.36.114) On 2024/6/4 5:25, kernel test robot wrote: > Hi Xiu, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on akpm-mm/mm-everything] > > url: https://github.com/intel-lab-lkp/linux/commits/Xiu-Jianfeng/mm-hugetlb_cgroup-identify-the-legacy-using-cgroup_subsys_on_dfl/20240603-201513 > base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything > patch link: https://lore.kernel.org/r/20240603120506.1837322-3-xiujianfeng%40huawei.com > patch subject: [PATCH -next 2/3] mm/hugetlb_cgroup: prepare cftypes based on template > config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240604/202406040437.z2Iel9db-lkp@intel.com/config) > compiler: aarch64-linux-gcc (GCC) 13.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240604/202406040437.z2Iel9db-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202406040437.z2Iel9db-lkp@intel.com/ > > All warnings (new ones prefixed by >>): > > mm/hugetlb_cgroup.c: In function 'hugetlb_cgroup_cfttypes_init': >>> mm/hugetlb_cgroup.c:828:21: warning: the comparison will always evaluate as 'true' for the address of 'name' will never be NULL [-Waddress] > 828 | if (tmpl->name) > | ^~~~ > In file included from include/linux/cgroup.h:27, > from mm/hugetlb_cgroup.c:20: > include/linux/cgroup-defs.h:605:14: note: 'name' declared here > 605 | char name[MAX_CFTYPE_NAME]; > | ^~~~ > Thanks, will fix in the next version. > > vim +828 mm/hugetlb_cgroup.c > > 814 > 815 static void __init > 816 hugetlb_cgroup_cfttypes_init(struct hstate *h, struct cftype *cft, > 817 struct cftype *tmpl, int tmpl_size) > 818 { > 819 char buf[32]; > 820 int i, idx = hstate_index(h); > 821 > 822 /* format the size */ > 823 mem_fmt(buf, sizeof(buf), huge_page_size(h)); > 824 > 825 for (i = 0; i < tmpl_size; cft++, tmpl++, i++) { > 826 *cft = *tmpl; > 827 /* rebuild the name */ > > 828 if (tmpl->name) > 829 snprintf(cft->name, MAX_CFTYPE_NAME, "%s.%s", buf, tmpl->name); > 830 /* rebuild the private */ > 831 if (tmpl->private) > 832 cft->private = MEMFILE_PRIVATE(idx, tmpl->private); > 833 /* rebuild the file_offset */ > 834 if (tmpl->file_offset) { > 835 unsigned int offset = tmpl->file_offset; > 836 > 837 cft->file_offset = MEMFILE_OFFSET0(offset) + > 838 MEMFILE_FIELD_SIZE(offset) * idx; > 839 } > 840 } > 841 } > 842 >