Re: [PATCH v6 01/11] kconfig: Add PicoSAT interface

From: Luis Chamberlain
Date: Wed Dec 04 2024 - 18:07:27 EST


On Mon, Oct 28, 2024 at 04:49:39AM +0100, Ole Schuerks wrote:
> PicoSAT (https://fmv.jku.at/picosat/) is the SAT solver used in this

PicoSAT [0] ... etc etc..

Then at the bottom you use the tag:

Link: https://fmv.jku.at/picosat/ # [0]

> project. It is used as a dynamically loaded library.

OK

> This commit contains a

Obviously this commit exits... be more imperative...

> script that installs PicoSAT as a library on the host system, a source file
> that provides a function for loading a subset of functions from the
> library, and a header file that declares these functions.

Just say something like:

Add PicoSAT dynamic library support to kconfig. Support for this will be
used subsequent patches.

> +static void load_function(const char *name, void **ptr, void *handle, bool *failed)
> +{
> + if (*failed)
> + return;
> +
> + *ptr = dlsym(handle, name);
> + if (!*ptr) {
> + printd("While loading %s: %s\n", name, dlerror());
> + *failed = true;
> + }
> +}
> +
> +bool load_picosat(void)
> +{
> + void *handle = NULL;
> + bool failed = false;
> +
> + /*
> + * Try different names for the .so library. This is necessary since
> + * all packages don't use the same versioning.
> + */
> + for (int i = 0; i < ARRAY_SIZE(picosat_lib_names) && !handle; ++i)
> + handle = dlopen(picosat_lib_names[i], RTLD_LAZY);
> + if (!handle) {

This just deals with the first error and there is no unwinding, is that OK?

Other than that, did you run this through checkpatch.pl?

Luis