From owner-svn-src-head@freebsd.org Fri Mar 6 21:25:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A6FB251313; Fri, 6 Mar 2020 21:25:31 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [157.161.13.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z0yf5TYxz3MPQ; Fri, 6 Mar 2020 21:25:30 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-94.100.156.244.flashcable.ch [94.100.156.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 2D44CC0DBB; Fri, 6 Mar 2020 22:25:28 +0100 (CET) Subject: Re: svn commit: r358720 - head/sys/dev/iicbus From: Andreas Tobler To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003062121.026LL180064742@repo.freebsd.org> Message-ID: <4901a173-c961-208a-5e94-d22be9867aac@FreeBSD.org> Date: Fri, 6 Mar 2020 22:25:27 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003062121.026LL180064742@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: Idefix Submit on 127.0.1.1 X-Rspamd-Queue-Id: 48Z0yf5TYxz3MPQ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.01 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.92)[-0.922,0]; NEURAL_SPAM_MEDIUM(0.93)[0.935,0]; ASN(0.00)[asn:6772, ipnet:157.161.0.0/16, country:CH] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 21:25:31 -0000 On 06.03.20 22:21, Andreas Tobler wrote: > Author: andreast > Date: Fri Mar 6 21:21:01 2020 > New Revision: 358720 > URL: https://svnweb.freebsd.org/changeset/base/358720 > > Log: > - Drop 'All rights reserved' > - Replace hardcoded size by nitems The CTLFLAG_MPSAFE I forgot to mention since I have it since years in my tree. Sorry. Andreas > > Modified: > head/sys/dev/iicbus/max6690.c > > Modified: head/sys/dev/iicbus/max6690.c > ============================================================================== > --- head/sys/dev/iicbus/max6690.c Fri Mar 6 21:15:25 2020 (r358719) > +++ head/sys/dev/iicbus/max6690.c Fri Mar 6 21:21:01 2020 (r358720) > @@ -2,7 +2,6 @@ > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2010 Andreas Tobler > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > @@ -124,7 +123,7 @@ max6690_read(device_t dev, uint32_t addr, uint8_t reg, > > for (;;) > { > - err = iicbus_transfer(dev, msg, 4); > + err = iicbus_transfer(dev, msg, nitems(msg)); > if (err != 0) > goto retry; > if (busy[0] & 0x80) > @@ -302,8 +301,9 @@ max6690_start(void *xdev) > "Sensor Information"); > /* I use i to pass the sensor id. */ > SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "temp", > - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, i % 2, > - max6690_sensor_sysctl, "IK", sysctl_desc); > + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, > + dev, i % 2, > + max6690_sensor_sysctl, "IK", sysctl_desc); > > } > /* Dump sensor location & ID. */ >