Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755294AbbLKXnX (ORCPT ); Fri, 11 Dec 2015 18:43:23 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:59464 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751928AbbLKXnW (ORCPT ); Fri, 11 Dec 2015 18:43:22 -0500 Date: Fri, 11 Dec 2015 15:43:21 -0800 From: Andrew Morton To: Dan Streetman Cc: Weijie Yang , Seth Jennings , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] mm/zswap: change incorrect strncmp use to strcmp Message-Id: <20151211154321.e5b03afe8122d0f5afa38f4d@linux-foundation.org> In-Reply-To: <1449876791-15962-1-git-send-email-ddstreet@ieee.org> References: <1449876791-15962-1-git-send-email-ddstreet@ieee.org> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 775 Lines: 21 On Fri, 11 Dec 2015 18:33:11 -0500 Dan Streetman wrote: > Change the use of strncmp in zswap_pool_find_get() to strcmp. > > The use of strncmp is no longer correct, now that zswap_zpool_type is > not an array; sizeof() will return the size of a pointer, which isn't > the right length to compare. whoops > We don't need to use strncmp anyway, > because the existing params and the passed in params are all guaranteed > to be null terminated, so strcmp should be used. > Thanks, I'll queue this for 4.4. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/