Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5999909pxv; Thu, 29 Jul 2021 04:03:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgM2r0Ny8JBv4ktFQK5J8uTfdY0yi91GDRHpIi3fa9ytElQpx82WPCXUCkhfLCYYBYlxnT X-Received: by 2002:a05:6e02:6cc:: with SMTP id p12mr3331424ils.13.1627556628893; Thu, 29 Jul 2021 04:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627556628; cv=none; d=google.com; s=arc-20160816; b=rMr4dJPU0UsyhqMj2ZGiUdYRSzigTpqSgY6Pn6I+A9WmAan+N2vyRop9pUZHY5kYno yabG+9IbazQxl7hhd/fOOzH50p2GsZautBpMIecn52J9g8cFc6422NVEuB+jkKW3dOmb Ot8Yzs1jPWTgNoNKwvOKe4HyMADAIITxgqfUC87hiA9ChOiU9d5APduMNGSxQEbHuWFv 4lrDxwiabLw7+IwoXA+aCTdJYd5on6kWBntA5TXFjPmgmwtz5hoo7pn+89DFi8XWJecH 8HnroJYcebTcoaHpXYWxj6+iHEh2AhhUgnWk5w0Om+TSNX+jbicW9FvfNHf6G9ZPasfu 0ZaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7CPl72CTRKTyBPOkyHMrKfvLxTsV28S+LW8UAm6G6RA=; b=1BVFIKpNbRpQnDnTH+0CoEsCzGNwGzIpm7u9RyvbcdxEV4CN+t0Po6qkC5Hvn1rlHZ jFN26NLBsfAIU3KJpq5Lu6asM4JhPK3TjCkBBQ5WibksMO6QCdrJwYiTdBLPkKW+U8rP IV5oy3dSE79/KLtrjy4SMtVhxaduot4Qb2qE20qkRDtVU0/rtN5gwYKpZs4KFK5kkZKP CmMEcJT0o/x7VKUwAYPQfSU6nXjp0ITXHhniaJsZSxGyix6h9uueU3vP0tVuhtL408+Y HZYd/XmeEk+p+XBAeSMAMeMkAMy2knU1N317pf2w04RAYqU6pKoljEUSvYU6bVbQYUuh +p4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hev-cc.20150623.gappssmtp.com header.s=20150623 header.b=YqupzJc1; 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 d14si2902540ilq.43.2021.07.29.04.03.34; Thu, 29 Jul 2021 04:03:48 -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=@hev-cc.20150623.gappssmtp.com header.s=20150623 header.b=YqupzJc1; 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 S236297AbhG2LBD (ORCPT + 99 others); Thu, 29 Jul 2021 07:01:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236264AbhG2LBD (ORCPT ); Thu, 29 Jul 2021 07:01:03 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B3C7C0613C1 for ; Thu, 29 Jul 2021 04:00:59 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id o5so10021026ejy.2 for ; Thu, 29 Jul 2021 04:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hev-cc.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7CPl72CTRKTyBPOkyHMrKfvLxTsV28S+LW8UAm6G6RA=; b=YqupzJc1n8+9T1c9St1JpnYa3HjOaBkFSrrk1FFQAhIQoRYTdyIoZ5Ym4vwDfqZR7k iQ4ZH7vlYe2LzU3WjnP0VVloLerC2HwDBZ2TUuJPNv7AckJn9RO/O5ZGTe1T4pDD04FL MrnYdNuX9ms2QWjocJOISakKIbvbl1l2FkKONcEGCsvQcjXvNT+pYLrCl7oXSPqE4wr9 RG5M/wiepphR5OI4zsvFoiaipGWrwi3TYOiOaCwooDfCDFT1CBozJZG0XC44FJ8wb/Dd 2cLkzCiTiq3gC22plVM2qk9AL2Oqv1fls1QEfLaUbq/uHjTWvrsWyzIijQVLaDFmNu4w X++A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7CPl72CTRKTyBPOkyHMrKfvLxTsV28S+LW8UAm6G6RA=; b=V+YTZC3tZmonBAjEJcLBFmmrwzIQbMO7RRQMWRI+xGVEm+hvpnQiQ1uP2kbJJIsKCn zcRtrB0H8nWQ2OgSOX9askLKJewnFK+6Ly7uu6GtYTv7DmsPH4+ghv4+h+19T0ywAkHC AGI9qlN2cBvmaXsSvqpMIcw6p0tiDlLLCAToxw6762p8Kc7X5tbusCUDVhdKsBlSHtb9 yaRDWx4jXGLIGTwKoADa38oqLZRkBMYJfa+Cc+CPN0pizq2BiqBM4EwPzvKWfsbToXpA Qhn63JuIiNjqj7gina5lLP16qNjsrFvbXz78MeIOsW3FZFw4bolKkgiKZUWfbwGMkrM+ jhYg== X-Gm-Message-State: AOAM532EhVHDudpy3ZbC/Sus2YibDKl71UOLd5Ygikc16d1MHaERcfbX IWl222ovfRIqtCcpY0zsfGpj7FXbizTxUv5b7NWgjA== X-Received: by 2002:a17:906:f20a:: with SMTP id gt10mr4080189ejb.267.1627556457991; Thu, 29 Jul 2021 04:00:57 -0700 (PDT) MIME-Version: 1.0 References: <20210729082549.144559-1-wangrui@loongson.cn> <20210729095342.GB8286@alpha.franken.de> In-Reply-To: <20210729095342.GB8286@alpha.franken.de> From: hev Date: Thu, 29 Jul 2021 19:00:47 +0800 Message-ID: Subject: Re: [RFC PATCH] locking/atomic: arch/mips: Fix atomic{_64,}_sub_if_positive To: Thomas Bogendoerfer Cc: Rui Wang , Peter Zijlstra , Will Deacon , Boqun Feng , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 29, 2021 at 5:53 PM Thomas Bogendoerfer wrote: > > On Thu, Jul 29, 2021 at 04:25:49PM +0800, Rui Wang wrote: > > This looks like a typo and that caused atomic64 test failed. > > > > Signed-off-by: Rui Wang > > Signed-off-by: hev > > --- > > arch/mips/include/asm/atomic.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h > > index 95e1f7f3597f..a0b9e7c1e4fc 100644 > > --- a/arch/mips/include/asm/atomic.h > > +++ b/arch/mips/include/asm/atomic.h > > @@ -206,7 +206,7 @@ ATOMIC_OPS(atomic64, xor, s64, ^=, xor, lld, scd) > > * The function returns the old value of @v minus @i. > > */ > > #define ATOMIC_SIP_OP(pfx, type, op, ll, sc) \ > > -static __inline__ int arch_##pfx##_sub_if_positive(type i, pfx##_t * v) \ > > +static __inline__ type arch_##pfx##_sub_if_positive(type i, pfx##_t * v) \ > > { \ > > type temp, result; \ > > \ > > sub_if_postive looks unused to me. Could you send a patch removing it > instead ? riscv also has a sub_if_positive implementation, which looks > unused. Okay. Regards, Rui > > Thomas. > > -- > Crap can work. Given enough thrust pigs will fly, but it's not necessarily a > good idea. [ RFC1925, 2.3 ]