Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/sh3/sh3



On 2021/09/08 20:47, Izumi Tsutsui wrote:
Module Name:	src
Committed By:	rin
Date:		Wed Sep  8 07:22:56 UTC 2021

Modified Files:
	src/sys/arch/sh3/sh3: pmap.c

Log Message:
Redo a part of rev 1.89:

- Remove redundant parentheses/braces/comments.
- Fix indents.

No binary changes confirmed this time.

---
-		if (kva) {
+		if (kva)
  			entry |= PG_V | PG_SH |
  			    ((prot & VM_PROT_WRITE) ?
  			    (PG_PR_KRW | PG_D) : PG_PR_KRO);
-		} else {
+		else
  			entry |= PG_V |
  			    ((prot & VM_PROT_WRITE) ?
  			    (PG_PR_URW | PG_D) : PG_PR_URO);
-		}
  	}
---

This part doesn't match KNF:
  http://cvsweb.netbsd.org/bsdweb.cgi/src/share/misc/style#rev1.58

Update style around single-line braces according to discussion.

https://mail-index.netbsd.org/tech-userlevel/2020/07/12/msg012536.html
https://mail-index.netbsd.org/tech-kern/2020/07/12/msg026594.html

Retain some examples of technically unnecessary braces that likely
aid legibility from the previous commit.

So I don't think removing existing ones per "redundant" is a valid reason.

Oops, I misread style. These and one more similar braces have been restored.
Thanks for pointing it out!

rin


Home | Main Index | Thread Index | Old Index