Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4466049ybz; Tue, 28 Apr 2020 11:46:07 -0700 (PDT) X-Google-Smtp-Source: APiQypKdM9/FkatKzm92BUfWKuw+ks8VgVm1+cIrEVlQZxurUYkeU/9iBPaGIFjV6zPB9DLaeK2g X-Received: by 2002:a50:da4a:: with SMTP id a10mr24202297edk.158.1588099567075; Tue, 28 Apr 2020 11:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588099567; cv=none; d=google.com; s=arc-20160816; b=WjeMYQwlSPZq4Hgxbx/VjsxsELJs7bCS4s0PENFFPUfI01YZVpm9SEz/4afTnR3u0t 1dsUnaCVqaBPL1cKGdPfLs6aUlaR5LVZbZ8ntNdn7xVfGurE5b8PmiNSjFv4XEUgKvyY zWoCxK6bpk9PC5ivpyyFKePYriVDA4afMUsuuE2YaYhdeAl7GzB1BjKFiiwDqEn6LEIZ 8b3qV8JuYK5WBhdW+pzUd23n+Z8qIhxVBJDXMn15qYEWIQF7vwvF0nWdIBQgvx8OJnaH Ca3gIFrou3ijHU7tgMVgET4zC2x0/Y4FrsUj2BKEONWoHdmIECV4MhTE3eUUC8E+LDF7 moRg== 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=MUmSsqcDC9YkvMt+/cIcfRgBOGA+aChksn5xMrVlHMw=; b=lGMfbFLxvMciXLhKDYeJEVF58k1+FniFnPk2PxaQqKwFKA2I8qfzLiPAfpJ11lYmSc +gOkMV4tHHSbPkL4qE2jdzS9DMikDDwZYExwoMxLdZVJEnWrTswZPj1CB5Jb4ypoETvg N68N5msNgOsRwiS3j5bVRWn+uICJNLj4tsAfwPotVdAX5hJ4uCkIERJ7MzypbDODDRdy Mo/h1vBeO8uYf8rvXZu6MwTjsqnxxarberv598nswYCILDwC8oQKsndJR8Q28zPVj4BG dD5O4YSySMOhYcYysoeysAo5Pksh80rCRZiZ/ygUm5rDItiybB4KuyJbtLzaBwQbeL5Y CHfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oXx6tfOi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si2208184edh.318.2020.04.28.11.45.43; Tue, 28 Apr 2020 11:46:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oXx6tfOi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731517AbgD1Soa (ORCPT + 99 others); Tue, 28 Apr 2020 14:44:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:37336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731490AbgD1SoZ (ORCPT ); Tue, 28 Apr 2020 14:44:25 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 04F2920575; Tue, 28 Apr 2020 18:44:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588099464; bh=aS0hFVpQWhXW7VFuiT/Y6uJtqHdrHx0vSSqNIPj78N4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oXx6tfOizS48q8olYvhrOV+0xM/wpt+H1htxQbeg8rGs7b9h+r6Cr+naVxt8k4i1b /hS/AjUjGI3xt896WCiGwAHgvYyNz/ys9lTyOz+zXJPyLCdUWdQssXIPLsnF94eLzK nlhTg0OeSk9M+pbLOYMHz1uZLXaXE1zbyczxcfD8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold , Michal Simek Subject: [PATCH 5.4 161/168] Revert "serial: uartps: Do not allow use aliases >= MAX_UART_INSTANCES" Date: Tue, 28 Apr 2020 20:25:35 +0200 Message-Id: <20200428182251.316191194@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200428182231.704304409@linuxfoundation.org> References: <20200428182231.704304409@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Michal Simek commit 91c9dfa25c7f95b543c280e0edf1fd8de6e90985 upstream. This reverts commit 2088cfd882d0403609bdf426e9b24372fe1b8337. As Johan says, this driver needs a lot more work and these changes are only going in the wrong direction: https://lkml.kernel.org/r/20190523091839.GC568@localhost Reported-by: Johan Hovold Signed-off-by: Michal Simek Cc: stable Link: https://lore.kernel.org/r/dac3898e3e32d963f357fb436ac9a7ac3cbcf933.1585905873.git.michal.simek@xilinx.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/xilinx_uartps.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1697,8 +1697,7 @@ err_out_unregister_driver: uart_unregister_driver(cdns_uart_data->cdns_uart_driver); err_out_id: mutex_lock(&bitmap_lock); - if (cdns_uart_data->id < MAX_UART_INSTANCES) - clear_bit(cdns_uart_data->id, bitmap); + clear_bit(cdns_uart_data->id, bitmap); mutex_unlock(&bitmap_lock); return rc; } @@ -1723,8 +1722,7 @@ static int cdns_uart_remove(struct platf rc = uart_remove_one_port(cdns_uart_data->cdns_uart_driver, port); port->mapbase = 0; mutex_lock(&bitmap_lock); - if (cdns_uart_data->id < MAX_UART_INSTANCES) - clear_bit(cdns_uart_data->id, bitmap); + clear_bit(cdns_uart_data->id, bitmap); mutex_unlock(&bitmap_lock); clk_disable_unprepare(cdns_uart_data->uartclk); clk_disable_unprepare(cdns_uart_data->pclk);