From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965056AbbJ0QSE (ORCPT ); Tue, 27 Oct 2015 12:18:04 -0400 Received: from mga01.intel.com ([192.55.52.88]:7582 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964826AbbJ0QSC (ORCPT ); Tue, 27 Oct 2015 12:18:02 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,205,1444719600"; d="scan'208";a="836703235" Date: Wed, 28 Oct 2015 00:15:54 +0800 From: kbuild test robot To: Matias =?iso-8859-1?Q?Bj=F8rling?= Cc: kbuild-all@01.org, axboe@fb.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, hch@infradead.org, jg@lightnvm.io, Stephen.Bates@pmcs.com, keith.busch@intel.com, Matias =?iso-8859-1?Q?Bj=F8rling?= Subject: [PATCH] lightnvm: fix memdup_user.cocci warnings Message-ID: <20151027161554.GA3884@lkp-ib03> References: <201510280028.QgqMel7f%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1445957719-5368-2-git-send-email-m@bjorling.me> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org drivers/lightnvm/core.c:657:8-15: WARNING opportunity for memdup_user Use memdup_user rather than duplicating its implementation This is a little bit restricted to reduce false positives Generated by: scripts/coccinelle/api/memdup_user.cocci CC: Matias Bjørling Signed-off-by: Fengguang Wu --- 0 files changed rule starting on line 17: position variables or mixed modifs interfere with comm_assoc isobool ( ( ( (unknown *to == NULL) >>> IS_ERR(rule starting on line 17:to) | !unknown *to >>> IS_ERR(rule starting on line 17:to) ) | (unknown *NULL == unknown *to) >>> IS_ERR(rule starting on line 17:to) ) || ...)