From patchwork Tue May 29 18:07:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 137205 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp4365940lji; Tue, 29 May 2018 11:10:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrQgg84io1CvVi56NAjXnlCN8/IpQ5dS95hvNruX5HwzOtVXPbqWvyeMC84zlOslDkoND3F X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr18776890plb.198.1527617439426; Tue, 29 May 2018 11:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527617439; cv=none; d=google.com; s=arc-20160816; b=DM//HXBQYRxcFINNQX82WHJPydj0dGmUb2bdjVLPjheMLAuFJqNOJqfzxBTD1hSy3t 5IcNMM/6r08kMlIibYNidKqaEB604cti+mhC8/Lm5qDC8QZDQsS7fsctMmR1LvbU1LIw oAttLsihegoKwWmzAbj5Fpn0oWNzv39LxKPohSkX6OtuGii1yJyOf89enrnwac+brS+7 hf6IoQGFEVCeGj1JWQTKOECdOVclDmQFKmieklIsmbkzcH0e9UwCgKsA2ZNFFVpHto84 T/zFRut8H71ak7Vy9uVWGTPzX8r6T5YUV91TbzBIovBilgwnme2dZcO9CIzxVGD7aFlz aXEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=LpV4HpGdic+CzCwIAOh+GAvvk8d2/P6rxZfR/p+F0kM=; b=fd0wtWWUdxpVPr5ck1/gqHb9ZZsfWHWCHBcBlDq7q35/YMMQjY5V00YmFu8qcrmnUP acF3VVcH+DfJxkD2siALxdHY2Wa1IlJIUkylSNMoQWN9l393QVu6QoaKXjdgyaJ9u/SM VNgCVD/eiPsDh2vMwOzO0HsS0u4YaLTUTZH7omjlflN+CMaH3SfEyzjW285SPAbHwi5U 5ruB6tkhhKxXgudjFGmZgIr6aL1q1mM7WqCWU3F1lZ7Icygr9WHHgbJeqjJDppKDkETG DUIlJ/1q0jdBGvw1NAL7YyovQ3Rl5fLVSg9UmdqrgcET5zbwdNXM7es+vxqw+PH1tRN1 VvyQ== ARC-Authentication-Results: i=1; mx.google.com; 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 h68-v6si10727890pgc.429.2018.05.29.11.10.39; Tue, 29 May 2018 11:10:39 -0700 (PDT) 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; 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 S936996AbeE2SKh (ORCPT + 30 others); Tue, 29 May 2018 14:10:37 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:45870 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965703AbeE2SIB (ORCPT ); Tue, 29 May 2018 14:08:01 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1E3B515AD; Tue, 29 May 2018 11:08:01 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B4A213F557; Tue, 29 May 2018 11:07:59 -0700 (PDT) From: Mark Rutland To: linux-kernel@vger.kernel.org Cc: Mark Rutland , Boqun Feng , Peter Zijlstra , Will Deacon , Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH 1/7] atomics/tty: add missing atomic_long_t * cast Date: Tue, 29 May 2018 19:07:40 +0100 Message-Id: <20180529180746.29684-2-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180529180746.29684-1-mark.rutland@arm.com> References: <20180529180746.29684-1-mark.rutland@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In ldsem_cmpxchg a pointer to unsigned long is passed to atomic_long_cmpxchg(), which expects a pointer to atomic_long_t. In preparation for making the atomic_long_* APIs type safe, add a cast before passing the value to atomic_long_cmpxchg(). Similar is already done in ldsem_atomic_update() when it calls atomic_long_add_return(). Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Cc: Greg Kroah-Hartman Cc: Jiri Slaby --- drivers/tty/tty_ldsem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 Acked-by: Greg Kroah-Hartman Reported-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland diff --git a/drivers/tty/tty_ldsem.c b/drivers/tty/tty_ldsem.c index 37a91b3df980..5f8aef97973f 100644 --- a/drivers/tty/tty_ldsem.c +++ b/drivers/tty/tty_ldsem.c @@ -86,7 +86,7 @@ static inline long ldsem_atomic_update(long delta, struct ld_semaphore *sem) */ static inline int ldsem_cmpxchg(long *old, long new, struct ld_semaphore *sem) { - long tmp = atomic_long_cmpxchg(&sem->count, *old, new); + long tmp = atomic_long_cmpxchg((atomic_long_t *)&sem->count, *old, new); if (tmp == *old) { *old = new; return 1;