Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp4940469imc; Mon, 25 Feb 2019 14:04:46 -0800 (PST) X-Google-Smtp-Source: AHgI3IbUYboY0jYysGp8oQ2cyiZ88lFuftv7ciiW5WN1g3yA3DZE/49AfPK4zm4gJzDMWX2tQTXN X-Received: by 2002:a17:902:b58a:: with SMTP id a10mr22432079pls.24.1551132286363; Mon, 25 Feb 2019 14:04:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551132286; cv=none; d=google.com; s=arc-20160816; b=uiDGbAVVNQgJ16jkyTrOTTH29xZDgxCPQ8wU8dMstAI8XCUNiwKysyWIafaxt5RkAu /TvTfEYWPT/WrNlnLmeP2/A0YV9NHNF7Qn9BglceWmy6OESXMG7mSV1jx1Tg1jwbrLI9 0vp6IoqBmNTC3Mp0vm2yhADmGt/HwnG+Yv19sGudKbNxrveMv19fbxbP5f+PkbdOdzh4 EheEkR40epaXY/e/FvyXaV8nZMsHrkVuO1NSeZON3JcyZ0Vr5D4cgDj28gzcUPpUTvK+ AjS0AXlr15V5+SL/gNtLoG1+Fm6pVKgLGhy1T9rT02I5n2uOI2lsCNAiZtArjVnA1wBD JdWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7iQIoLW2e9+Bj85YUDMw6A0pqhjv4vOL++8JQdSkBE0=; b=YtPDvzb23xVwKKsH4taNBQM6/Vw933K4U1pEHoVIEFewDLDTK5GI0wN/KgT59NcNyU GxZg7Uz3lDKNFZcJ4HeKuJom4mm82zBt0zTUGu2M1TY9ESA6vI3hSWRAO3+1kHdKgRzk 2FVeNKx8pkdtvbgowpH+k7sD0AXMpenm4g+/uRTCmwDjyGtyb/lODsTQDDU1H7T3LShn g6U8q+StTeHo14XXVKKl+mkC/YO1mIZZ8FnSaJRlgeq56i0SfI9rpoauiAw3l51Ob64i zStQcYcR/ZrM9u6cgVnYOc/aj9OhB6z/YvO95AdEgrruogYAGrOTX/WYgFElLgTnkI85 EiAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PwDaoTfP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j4si10480656pgc.186.2019.02.25.14.04.31; Mon, 25 Feb 2019 14:04:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PwDaoTfP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729620AbfBYVP5 (ORCPT + 99 others); Mon, 25 Feb 2019 16:15:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:47304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729611AbfBYVPx (ORCPT ); Mon, 25 Feb 2019 16:15:53 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E0DC621734; Mon, 25 Feb 2019 21:15:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551129352; bh=mcNHz84GPAYmBooTu7laonl2FeFmgZAy08InvX3IYD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PwDaoTfPadaNMb4I4V9KgcPdP10rYXZ+OpqKMrmtmaRfIo3dNoqDPL/dNMVgmpHGC bR3vOzO9Ew57zk3xO1Nu8iNqomtElqrSbXTlJbssmSrv2DTEb8Z/mLeJW5iB25nCSz 8ay5W6IQ5kyeWkDQ/u7GHQ+tKqbVZ94OuZoUCfqE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthias Kaehlcke , Sergey Senozhatsky , Minchan Kim , Doug Anderson , Andrew Morton , Linus Torvalds , Nathan Chancellor Subject: [PATCH 4.9 56/63] mm/zsmalloc.c: change stat type parameter to int Date: Mon, 25 Feb 2019 22:11:56 +0100 Message-Id: <20190225195040.103806388@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190225195035.713274200@linuxfoundation.org> References: <20190225195035.713274200@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matthias Kaehlcke commit 3eb95feac113d8ebad5b7b5189a65efcbd95a749 upstream. zs_stat_inc/dec/get() uses enum zs_stat_type for the stat type, however some callers pass an enum fullness_group value. Change the type to int to reflect the actual use of the functions and get rid of 'enum-conversion' warnings Link: http://lkml.kernel.org/r/20170731175000.56538-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Doug Anderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman --- mm/zsmalloc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -558,20 +558,23 @@ static int get_size_class_index(int size return min(zs_size_classes - 1, idx); } +/* type can be of enum type zs_stat_type or fullness_group */ static inline void zs_stat_inc(struct size_class *class, - enum zs_stat_type type, unsigned long cnt) + int type, unsigned long cnt) { class->stats.objs[type] += cnt; } +/* type can be of enum type zs_stat_type or fullness_group */ static inline void zs_stat_dec(struct size_class *class, - enum zs_stat_type type, unsigned long cnt) + int type, unsigned long cnt) { class->stats.objs[type] -= cnt; } +/* type can be of enum type zs_stat_type or fullness_group */ static inline unsigned long zs_stat_get(struct size_class *class, - enum zs_stat_type type) + int type) { return class->stats.objs[type]; }