Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C69A610A0A for ; Mon, 11 Mar 2024 07:39:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710142756; cv=none; b=U7ASqPk8HznrPk7CX2EKAA1lQYhUepyYS6BYzF3WiVK/LxC69yYOKi54YN2eilMwfFGx7Nd/ZuW21JqGM0zKDrkfzbWYcC9B0rkprng5kAdfd+Kl14RmcVUgpJRvn5YsiBPLhygOmZOPQT5jmaZc7P/m9Lu18CBhN6zwgmVayzQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710142756; c=relaxed/simple; bh=HCqJ3MKJM8FsJti6RbIoYD16j5p0UvbeSiEZ4jq9OiE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Alouf2+SZq2tLz2cupf8tAmt5R8aJKd7rsaQRg7yu2qCiDIa8ftkPRM0NX5w4lhhw5t0IrNE5kRb0899kjpBG1VwRxfPVxFWrqHF14u9jCNvN6wZobAWWkQaq6rAEi0Zg2BfHSQhyCYYbqbW+5QfHw53R1eYm/wATiUD4XYqH9o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=d1kdQ2jk; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="d1kdQ2jk" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4131ad76f05so17641725e9.0 for ; Mon, 11 Mar 2024 00:39:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710142753; x=1710747553; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=9Q42ApgzPZ0VvqwLXI9+pbovLbHK370/VfPx2EYbvF0=; b=d1kdQ2jkqv7AQLLlyphReUwGm0z7oHYUCFYq3PZmhl1S45uDErYVm0TnOT6yBGi0gU DfBJzreSACwU7NcAV6NjL9OXnUe8wjt2Moj/2bVoqUO4EgdDec6XILBv+g7zMZm/8LYz /MH+diPDqCR59R25HlNwZ1vgmR3TXqkEqMNEqi0FtCw954bjeIG3pPf2iwfCkHNoTfJQ ZYmglC3mR9W3G2HIZgS9jr8CPM57gbxY7H6O3kgPvSS/9E+n8Jau3f5/3LfyiI8BMWyL 0b+64Ni7L9/mfLKulRRsj179cKr7lf5IAZ31iJWeIYxT1GpktV5XpyJKVkXLO9BN9XxA TsQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710142753; x=1710747553; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9Q42ApgzPZ0VvqwLXI9+pbovLbHK370/VfPx2EYbvF0=; b=N9F0H3bxOQVy8LqnWkmYeLhcSlI3mx4ktPkPECRxAf2T9WrH9a2DBXaD8vSDH85qTh iPnnWpCZfiDa7siaLSjy0Z3+Z+zC0cuIQvoW59agdAJsbuCEjEHs6G7NV2ewMinScZlN 1guPMxjGofFWxCA+uHMVWceWcGERulN/W4Zr6Fjk8QCGQ6uj7XX7280TlGMFRSSpnJxy PPOrpqrKdaz2Wp/1/If39gEv+QD2ddl7BhJ5pC1/bdlhdUBb8tJmjZOJdj5ujISZIC3/ 752JntOaeg8HD9nvjXFIyX0Z+rsuShEOaFfPGEGoupP8EXwzl9CCBP+FuEOXYvo/VvYl sgtQ== X-Gm-Message-State: AOJu0Yy3jg2J5fh4wcN+o7vMhPVH5MxG7/MU9uyc92geg5qDolHwe9Im qWZxmjZLtluub2SHzlKdOYP0fFS74qCDRIWEQ398zFSbcM7pPojGgcuwzKpAgvuSu5bdjDwiGTp L X-Google-Smtp-Source: AGHT+IGYvmJ/RB9F+th2oNFbRRxY+WWRmiT+j9WLB+iN5S7xkOq4o1Gd21KXS06Ad5P8ORVXTjj9vg== X-Received: by 2002:a05:600c:1d91:b0:413:1040:ac89 with SMTP id p17-20020a05600c1d9100b004131040ac89mr4083599wms.27.1710142752823; Mon, 11 Mar 2024 00:39:12 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id hg9-20020a05600c538900b00412f855bcc2sm14523921wmb.43.2024.03.11.00.39.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 00:39:12 -0700 (PDT) Date: Mon, 11 Mar 2024 10:39:08 +0300 From: Dan Carpenter To: =?utf-8?B?5p2O5Lmm55WF?= Cc: smatch@vger.kernel.org Subject: Re: Re: Re: Re: Re: Re: about using smatch in all debian C code Message-ID: References: <28841114.12973.18e12649674.Coremail.lishuchang@hust.edu.cn> <65cbde84.26ce5.18e132930df.Coremail.lishuchang@hust.edu.cn> <114bf6c8-2916-4770-aafe-33e6cab7ff4f@moroto.mountain> <05b886e5-cb94-4396-987a-f54a666f3c80@moroto.mountain> <6b3acdbb.13547.18e170213be.Coremail.lishuchang@hust.edu.cn> <46a7a880-fffa-42fb-9647-87bd5ec423be@moroto.mountain> <3b9e9279.28e21.18e26b879d8.Coremail.lishuchang@hust.edu.cn> <02ed1898-2947-4976-b192-c4f1e740dbec@moroto.mountain> <6abd1958.297e1.18e2bfeb1d8.Coremail.lishuchang@hust.edu.cn> Precedence: bulk X-Mailing-List: smatch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6abd1958.297e1.18e2bfeb1d8.Coremail.lishuchang@hust.edu.cn> On Mon, Mar 11, 2024 at 01:31:35PM +0800, 李书畅 wrote: > Hello Dan, in the smatch.txt, you said : > If you are building something else (which is not the Linux kernel) then use > something like: > make CHECK="~/progs/smatch/devel/smatch --full-path" \ > CC=~/progs/smatch/devel/smatch/cgcc | tee smatch_warns.txt, > > I'd like to know what file does this full-path refer to? And if it means the full path of the C project you want to check, > what is the difference between using '-p=' and '--full-path'? -p stands for --project. It's for when there is project specific code. Mostly it's the linux kernel which has tons of specific checks. The --full-path option is for recursive Makefiles where you enter sub-directorys and run make. The kernel doesn't use a recursive build system so all the warning messages have drivers/foo/bar/file.c. Nice. But with a recursive build system the warning messages just have file.c. Then when you add --full-path they have /home/whatever/kernel/drivers/foo/bar/file.c which isn't as nice, but it's more useful than just file.c regards, dan carpenter