Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4881488imu; Wed, 19 Dec 2018 01:48:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/UDigvN5ebWiD0IExW1D9r5gqnJRsPAvVgFr3QP/dTV9TmgAhS6ujTyDFKPuamgYKebqryP X-Received: by 2002:a65:4ccb:: with SMTP id n11mr19230746pgt.257.1545212930372; Wed, 19 Dec 2018 01:48:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545212930; cv=none; d=google.com; s=arc-20160816; b=LFszeMPCukeRz2w775n/0gQiQMdZYJ2j6HD0b36X0x6/cIT91bxs6fePl3RB3oTUma nvROkVUagzIOxbOEbFqj4z9vZjOi3X5dIRtEnoL++tDmymS/2wJnZdEvsMTkk0Gio/pz wLdZJB10w0ggLjeWPCkLawJhAyBQ0DlQ043WY0b04qChN6oRK3y+yz3bJTs0STEbFCVx ELnq1WPTVdP3zzqfCIGm+Xb6Lja0iuf2JBCCZCb0RoaWyzyyPH5RJKx4keyJSRRRbEDx 3FwmdOp21H9rR37NAXAeDOqIU4vXaDdSFc8zRmOQp1IfUB3ECxQuK99R8GYjj310TUSj cDWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=TuCpSMpWIEaYjQlh0UJtISg8gGP4dUwfsuw6wy6uFmw=; b=jRpCXdMy9LVtNV6skrAgmq2ThVN8xsk+mdpQ/j27mzxGi64KqV13bv4J/ZRGxYKB26 13U6PA6n5hkhudsM0D8EA69MFw8N1KjRMrey0Fp7qpvfr+a5Y/NTltGqK2/vb4q/jDxv GtpVjgAKLiDOyfQXA7ko+3HTXNNLNDmv7krA9c6b2lZYkUmaDmi1bWlmca04Vca6hpkZ uogP64EXeSMzYpjNqIjMpZfF+jQVlw+jf8fiKUTm5aLdxbFu/IqvO5lk7i7TJMQA77aN xGYI8bdz0QyD6slKC5dwnOrPo1Z8zl3grUhYSaFWNDw+JniAbw0/fDP+d4UWjr0mdcqs dwGQ== 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 s5si15529254pgl.481.2018.12.19.01.48.35; Wed, 19 Dec 2018 01:48:50 -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; 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 S1728573AbeLSJjS (ORCPT + 99 others); Wed, 19 Dec 2018 04:39:18 -0500 Received: from mail-vs1-f68.google.com ([209.85.217.68]:45838 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbeLSJjR (ORCPT ); Wed, 19 Dec 2018 04:39:17 -0500 Received: by mail-vs1-f68.google.com with SMTP id x28so4210632vsh.12; Wed, 19 Dec 2018 01:39:17 -0800 (PST) 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=TuCpSMpWIEaYjQlh0UJtISg8gGP4dUwfsuw6wy6uFmw=; b=JvypdjZQAfQRU/xxr15TP2QQRuk7Oh5dnGonuaK38P3h+XmCuywzqW2pn8UCduS05t IGtP6ojoh0K2WeLA6HqfizoRiAXhAchjpw1FSgTp2+FysatO+ZA7obwz+q6CLR3ELmuN HUp+65wFgVuGATauLjhuAP7TPRJh24piGbn1vxNJX93KDabo/bGtjjd8/xQPVP/kI1JL l0RVENOh/EfdlezGcco0Lbtm9M+WE64Bf1lxYqUSF+MHstol5LgIGHX5g3eHIi2oknSl rcflm0jgQkvgZnx7+c7sOvkvFgGb71pSdAJrdUOpn/dJIeBM7JyY17i7gNdHOexvdw9J GLBA== X-Gm-Message-State: AA+aEWbl3c18DTJDxShvfc8Sh6KhVFF/cd7FDl8juJ5hM+zhWepHk2p9 CAlcsPVu/O0IaC3GPbR6yCKS3RkT97EyebElgnM= X-Received: by 2002:a67:c202:: with SMTP id i2mr9058755vsj.11.1545212356638; Wed, 19 Dec 2018 01:39:16 -0800 (PST) MIME-Version: 1.0 References: <20181210210310.12677-1-wsa+renesas@sang-engineering.com> <20181210210310.12677-2-wsa+renesas@sang-engineering.com> <20181218233354.pie5i3lvrrhq5q2c@ninjato> In-Reply-To: <20181218233354.pie5i3lvrrhq5q2c@ninjato> From: Geert Uytterhoeven Date: Wed, 19 Dec 2018 10:39:05 +0100 Message-ID: Subject: Re: [RFC/RFT 01/10] i2c: add 'is_suspended' flag for i2c adapters To: Wolfram Sang Cc: Peter Rosin , Hans de Goede , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , Wolfram Sang , "linux-i2c@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wolfram, On Wed, Dec 19, 2018 at 12:34 AM Wolfram Sang wrote: > > > + unsigned int is_suspended:1; /* owned by the I2C core */ > > > > When more stuff is added to this bit field (which always happens at > > some point) updates to all members of the bit field will have to use > > the same root-adapter-locking, or we will suffer from RMW-races. So > > this feels like an invitation for future disaster. Maybe a comment > > about that to remind our future selves? Or perhaps the bit field > > should be avoided altogether? > > Changed to bool. Thanks! Does that help, given bool is smaller than the CPUs word size? Is it Alpha that cannot do atomic operations on bytes? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds