From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933057AbbIUOG4 (ORCPT ); Mon, 21 Sep 2015 10:06:56 -0400 Received: from mout.web.de ([212.227.15.4]:60541 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932323AbbIUOGx (ORCPT ); Mon, 21 Sep 2015 10:06:53 -0400 Subject: Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than zero To: Andrzej Hajda References: <1442831864-25759-1-git-send-email-a.hajda@samsung.com> <55FFFFF4.4000007@users.sourceforge.net> <56000777.6060208@samsung.com> Cc: Bartlomiej Zolnierkiewicz , Gilles Muller , Joe Perches , Nicolas Palix , Michal Marek , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, cocci@systeme.lip6.fr From: SF Markus Elfring X-Enigmail-Draft-Status: N1110 Message-ID: <56000EE3.7040602@users.sourceforge.net> Date: Mon, 21 Sep 2015 16:06:27 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <56000777.6060208@samsung.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:6NbLZMrDJE1iSfvqn1ml9dTf6sznbn+So/33QDQKML3HUn1dbFX 5EEGY8VbsCjjmhuTiHWOiUiJJPN9dd1OXZdkh3T16sCNtyzDxT9MWqUtpk7SDDVxfOpRnpf ozjiUx/k3sf3dbMQioKqvro0HAfrui2NeToN8V7jbEjWh9/IYgOHN5y6g6oLGIuLzBmW1od zFY8eheYZ+3Uw3V0DorGw== X-UI-Out-Filterresults: notjunk:1;V01:K0:6Kd2dPJABxw=:mdpVvLjQc4sxJ1PXqqneCQ q3iFkrJgbCWnyEO8b1hifsU/d72SSXB4WwxoyylLPk+fappcyp6lBn6eV+S8XvX6cnCl7LtDt 8bprOQ+cZdoK3Rqfjane9KwTkMHlktr4kYfriSHYXN50nEiIW/Tnw3tzhlUZAP5T5vL2Gx6QX vlF2TZLfCABXKH8M3fOPkdI0iO8zMCPpUKyoktWREtZ4dSTjfzS6nOhOXzQ5bpXKYR+N/hdCB OuftvZkAaIHA4jkLk9m4SXbQS8KHHNkOZELnzsqGAfUfMwDqIFoELK36+EkLYyGSJG3iqdrvz imhnzvy0ge+yFdV0JPuyOFWAUTBI8IgXwrGQRRjLOaxiuJSzLnMfZpQGDNXdeFkzYtwF2d+Um ssCDTAnoXFUunfJnVTduMmIfx8kDQ4etvPBJ7on9gS3lIQOMQ9SPESAkAk7zZICG7+a/AXsNs MxAoUHslNdQgsom41P2lNIgtfSUqkzHwxi6Qm7X8+yAL/oUtWvXZqmKAlB1z70A5g7ylKejY6 8KRDv/QFnqSXBsxkLYbRpAvKKUTZHd0LMJlSCtvzySdCCaWjiqyMrsE7ru69+3VmhMTdPrnUW 6L6IbrvM70tVXHpVOzaTEW9J2g9Z4aP8jdAwOe+X4yaBdjJ+frEMyB7wUQnAZQmsiOSdS5zOF jRKXQdACyrqicMQBqukepEkIDt0NgqbEq9lWB8co5zGN3wHdBcjVOFe8E4k4mnNZerAK/V6TE kcUZtcZM0eAba1z5YyLsJfHnT4mtGXlVyl3rZg== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> * Reuse of "long int"? > If you mean adding int to 'unsigned long [long]' types, it does not work. I am surprised. > For some reason it works only without adding int after long. The Coccinelle software should support the term "generic_ctype" from the SmPL grammar so far, shouldn't it? http://coccinelle.lip6.fr/docs/main_grammar005.html#ctype >> * Splitting of the suggested SmPL rule so that each source code check >> will be connected with appropriate warning messages. > Personally I prefer one message as it is more compact It might look convenient to combine a few source code checks. > and fits quite well in both cases, I got an other impression. > but I have no strong fillings with separate message for each case. * v@p < 0 Find places where this condition will always be false. *v@p >= 0 Find places where this condition will always be true. Will it help to distinguish these special cases also in your SmPL script strictly? Regards, Markus