From nobody Fri May 8 02:19:30 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DC2FC433F5 for ; Fri, 13 May 2022 02:41:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376557AbiEMCli (ORCPT ); Thu, 12 May 2022 22:41:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376539AbiEMCl2 (ORCPT ); Thu, 12 May 2022 22:41:28 -0400 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7D6762BF8 for ; Thu, 12 May 2022 19:41:26 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1652409684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=4jjnk+QDL8cNXK+XlAhyOlRkhsLJfwm4AuVjS6SIBdU=; b=s7h2HIaBh8pyCxOmw32WC4p867WDpAAzQVoO9w/UuKwaNvcveu357EU+wRJIrqXhGFRfkD 6GZBQcB2uVsqV/M0wkoVlZSErHbNuVu3AUx9vFAEDTbZLc9m0x30RBalLucoydCbO7aspp VaGEUMPEvfqtbNDRMKPdTJ0gQsqox14= From: Yajun Deng To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com Cc: linux-kernel@vger.kernel.org, Yajun Deng Subject: [PATCH] sched/deadline: Use proc_douintvec_minmax() limit minimum value Date: Fri, 13 May 2022 10:41:09 +0800 Message-Id: <20220513024109.648471-1-yajun.deng@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" proc_dointvec() is not applicable for unsigned integer, use proc_douintvec_minmax() limit minimum value. Signed-off-by: Yajun Deng --- kernel/sched/deadline.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 85cd62e0dddd..4d2a780c6f73 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -30,14 +30,16 @@ static struct ctl_table sched_dl_sysctls[] =3D { .data =3D &sysctl_sched_dl_period_max, .maxlen =3D sizeof(unsigned int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler =3D proc_douintvec_minmax, + .extra1 =3D (void *)&sysctl_sched_dl_period_min, }, { .procname =3D "sched_deadline_period_min_us", .data =3D &sysctl_sched_dl_period_min, .maxlen =3D sizeof(unsigned int), .mode =3D 0644, - .proc_handler =3D proc_dointvec, + .proc_handler =3D proc_douintvec_minmax, + .extra2 =3D (void *)&sysctl_sched_dl_period_max, }, {} }; --=20 2.25.1