all the faith he had had had had no effect on his life
A grammatically correct sentence about someone’s faith he had had which had had no effect on his life.
The man was always faithful, but it never seemed to do any good. In fact, you could say all the faith he had had had had no effect on his life.