Skip to contentSkip to conversation

rust: build: Fix grep warning

PATCH Applied Vincenzo Palazzo 3 participants 3 messages Mar 2, 2023 – Apr 6, 2023 Rust

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rust: build: Fix grep warning

Fix grep warning during the build, with GNU grep 3.8 with the following command

grep -v '^\#\|^$$' rust/bindgen_parameters

I see the following warning

```
grep: warning: stray \ before #

--opaque-type xregs_state
--opaque-type desc_struct
--opaque-type arch_lbr_state
--opaque-type local_apic

--opaque-type x86_msi_data
--opaque-type x86_msi_addr_lo

--opaque-type kunit_try_catch

--opaque-type spinlock

--no-doc-comments
```
---
 rust/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/Makefile +1 -1
index f88d108fbef0..41ac8401a8be 100644
@@ -283,7 +283,7 @@ quiet_cmd_bindgen = BINDGEN $@
 		$(bindgen_target_cflags) $(bindgen_target_extra)
 
 $(obj)/bindings/bindings_generated.rs: private bindgen_target_flags = \
-    $(shell grep -v '^\#\|^$$' $(srctree)/$(src)/bindgen_parameters)
+    $(shell grep -v '^#\|^$$' $(srctree)/$(src)/bindgen_parameters)
 $(obj)/bindings/bindings_generated.rs: $(src)/bindings/bindings_helper.h \
     $(src)/bindgen_parameters FORCE
 	$(call if_changed_dep,bindgen)
Signature · 1 line
2.39.2
Tested-by Reviewed-by on v1 1/1
#1 lore raw
Quoted 35 lines · Vincenzo Palazzo

Fix grep warning during the build, with GNU grep 3.8 with the following command

grep -v '^\#\|^$$' rust/bindgen_parameters

I see the following warning

```
grep: warning: stray \ before #

--opaque-type xregs_state
--opaque-type desc_struct
--opaque-type arch_lbr_state
--opaque-type local_apic

--opaque-type x86_msi_data
--opaque-type x86_msi_addr_lo

--opaque-type kunit_try_catch

--opaque-type spinlock

--no-doc-comments
```
---
 rust/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/Makefile +0 -0
index f88d108fbef0..41ac8401a8be 100644

rust/Makefile quiet_cmd_bindgen = BINDGEN $@ · line 289

Quoted 8 lines
rust/Makefile +1 -1
@@ -283,7 +283,7 @@ quiet_cmd_bindgen = BINDGEN $@
 		$(bindgen_target_cflags) $(bindgen_target_extra)
 
 $(obj)/bindings/bindings_generated.rs: private bindgen_target_flags = \
-    $(shell grep -v '^\#\|^$$' $(srctree)/$(src)/bindgen_parameters)
+    $(shell grep -v '^#\|^$$' $(srctree)/$(src)/bindgen_parameters)
 $(obj)/bindings/bindings_generated.rs: $(src)/bindings/bindings_helper.h \
     $(src)/bindgen_parameters FORCE
 	$(call if_changed_dep,bindgen)

Because this is surrounded by quotes there's no problem to no escape it.